-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuring with pyproject.toml (#1436)
* Move to pyproject toml * Update pyproject.toml Co-authored-by: Aliaksei Urbanski <[email protected]> * Update scripts/build_pypi_package.sh Co-authored-by: Aliaksei Urbanski <[email protected]> * Merge remote-tracking branch 'upstream/main' into pyproject-toml-configuration * Maintain pip show command --------- Co-authored-by: Aliaksei Urbanski <[email protected]>
- Loading branch information
1 parent
ef883ad
commit 69638bf
Showing
15 changed files
with
166 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,69 @@ | ||
# black project prefers pyproject.toml | ||
# that's why we have this file in addition to other setting files | ||
[build-system] | ||
requires = ["setuptools", "pytest-runner"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "slack_sdk" | ||
dynamic = ["version", "readme", "authors"] | ||
description = "The Slack API Platform SDK for Python" | ||
license = { text = "MIT" } | ||
requires-python = ">=3.6" | ||
keywords = [ | ||
"slack", | ||
"slack-api", | ||
"web-api", | ||
"slack-rtm", | ||
"websocket", | ||
"chat", | ||
"chatbot", | ||
"chatops", | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Topic :: Communications :: Chat", | ||
"Topic :: System :: Networking", | ||
"Topic :: Office/Business", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
|
||
|
||
[project.urls] | ||
Documentation = "https://slack.dev/python-slack-sdk/" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["slack*", "slack_sdk*"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "slack_sdk.version.__version__" } | ||
readme = { file = ["README.md"], content-type = "text/markdown" } | ||
|
||
[tool.distutils.bdist_wheel] | ||
universal = true | ||
|
||
[tool.black] | ||
line-length = 125 | ||
line-length = 125 | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
log_file = "logs/pytest.log" | ||
log_file_level = "DEBUG" | ||
log_format = "%(asctime)s %(levelname)s %(message)s" | ||
log_date_format = "%Y-%m-%d %H:%M:%S" | ||
filterwarnings = [ | ||
"ignore:\"@coroutine\" decorator is deprecated since Python 3.8, use \"async def\" instead:DeprecationWarning", | ||
"ignore:The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.:DeprecationWarning", | ||
"ignore:slack.* package is deprecated. Please use slack_sdk.* package instead.*:UserWarning", | ||
] | ||
asyncio_mode = "auto" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# pip install -r requirements/optional.txt | ||
# async modules depend on aiohttp | ||
aiodns>1.0 | ||
# We recommend using 3.7.1+ for RTMClient | ||
# https://github.com/slackapi/python-slack-sdk/issues/912 | ||
aiohttp>=3.7.3,<4 | ||
# used only under slack_sdk/*_store | ||
boto3<=2 | ||
# InstallationStore/OAuthStateStore | ||
# Since v3.20, we no longer support SQLAlchemy 1.3 or older. | ||
# If you need to use a legacy version, please add our v3.19.5 code to your project. | ||
SQLAlchemy>=1.4,<3 | ||
# Socket Mode | ||
# websockets 9 is not compatible with Python 3.10 | ||
websockets>=9.1,<10; python_version=="3.6" | ||
websockets>=10,<11; python_version>"3.6" | ||
websocket-client>=1,<2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# pip install -r requirements/testing.txt | ||
pytest>=7.0.1,<8 | ||
pytest-asyncio<1 # for async | ||
Flask-Sockets>=0.2,<1 | ||
Flask>=1,<2 # TODO: Flask-Sockets is not yet compatible with Flask 2.x | ||
Werkzeug<2 # TODO: Flask-Sockets is not yet compatible with Flask 2.x | ||
itsdangerous==1.1.0 # TODO: Flask-Sockets is not yet compatible with Flask 2.x | ||
Jinja2==3.0.3 # https://github.com/pallets/flask/issues/4494 | ||
pytest-cov>=2,<3 | ||
# while flake8 5.x have issues with Python 3.12, flake8 6.x requires Python >= 3.8.1, | ||
# so 5.x should be kept in order to stay compatible with Python 3.6/3.7 | ||
flake8>=5.0.4,<7 | ||
# Don't change this version without running CI builds; | ||
# The latest version may not be available for older Python runtime | ||
black>=22.8.0; python_version=="3.6" | ||
black==22.10.0; python_version>"3.6" | ||
click==8.0.4 # black is affected by https://github.com/pallets/click/issues/2225 | ||
psutil>=5,<6 | ||
# used only under slack_sdk/*_store | ||
boto3<=2 | ||
moto>=3,<4 # For AWS tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
script_dir=`dirname $0` | ||
cd ${script_dir}/.. | ||
rm -rf ./slack_sdk.egg-info | ||
|
||
pip install -U pip && \ | ||
pip install twine build && \ | ||
rm -rf dist/ build/ slack_sdk.egg-info/ && \ | ||
python -m build --sdist --wheel && \ | ||
twine check dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
#!/bin/bash | ||
|
||
python setup.py upload | ||
script_dir=`dirname $0` | ||
cd ${script_dir}/.. | ||
rm -rf ./slack_sdk.egg-info | ||
|
||
pip install -U pip && \ | ||
pip install twine build && \ | ||
rm -rf dist/ build/ slack_sdk.egg-info/ && \ | ||
python -m build --sdist --wheel && \ | ||
twine check dist/* && \ | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
script_dir=`dirname $0` | ||
cd ${script_dir}/.. | ||
rm -rf ./slack_sdk.egg-info | ||
|
||
pip install -U pip && \ | ||
pip install twine build && \ | ||
rm -rf dist/ build/ slack_sdk.egg-info/ && \ | ||
python -m build --sdist --wheel && \ | ||
twine check dist/* && \ | ||
twine upload --repository testpypi dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
pip uninstall -y slack-sdk && \ | ||
pip freeze | grep -v "^-e" | xargs pip uninstall -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[aliases] | ||
test=pytest | ||
; Legacy package configuration, prefer pyproject.toml over setup.cfg or setup.py | ||
[metadata] | ||
url=https://github.com/slackapi/python-slack-sdk | ||
author=Slack Technologies, LLC | ||
author_email[email protected] |
Oops, something went wrong.