summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMilas Bowman <milas.bowman@docker.com>2022-07-30 12:14:27 -0400
committerGitHub <noreply@github.com>2022-07-30 12:14:27 -0400
commitcd2c35a9b699522b282cc4f024efa5699df24896 (patch)
tree18717584169b7cbbd1196be5fe327dd36136aad7 /setup.py
parent828d06f5f5e2c8ecd9a8d53c1ef40f37d19a62f5 (diff)
downloaddocker-py-cd2c35a9b699522b282cc4f024efa5699df24896.tar.gz
ci: add workflow for releases (#3018)
GitHub Actions workflow to create a release: will upload to PyPI and create a GitHub release with the `sdist` and `bdist_wheel` as well. The version code is switched to `setuptools_scm` to work well with this flow (e.g. avoid needing to write a script that does a `sed` on the version file and commits as part of release). Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index c6346b0..68f7c27 100644
--- a/setup.py
+++ b/setup.py
@@ -29,9 +29,6 @@ extras_require = {
'ssh': ['paramiko>=2.4.3'],
}
-version = None
-exec(open('docker/version.py').read())
-
with open('./test-requirements.txt') as test_reqs_txt:
test_requirements = [line for line in test_reqs_txt]
@@ -42,7 +39,9 @@ with codecs.open('./README.md', encoding='utf-8') as readme_md:
setup(
name="docker",
- version=version,
+ use_scm_version={
+ 'write_to': 'docker/_version.py'
+ },
description="A Python library for the Docker Engine API.",
long_description=long_description,
long_description_content_type='text/markdown',
@@ -54,6 +53,7 @@ setup(
'Tracker': 'https://github.com/docker/docker-py/issues',
},
packages=find_packages(exclude=["tests.*", "tests"]),
+ setup_requires=['setuptools_scm'],
install_requires=requirements,
tests_require=test_requirements,
extras_require=extras_require,