Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Warren <bmw@users.noreply.github.com>2021-04-02 20:37:48 +0300
committerGitHub <noreply@github.com>2021-04-02 20:37:48 +0300
commit584a1a3ecee8c48721167a5d4e25d8726167162b (patch)
tree6b88ea2f74a7d9490aae504c89c80292e405a3e4 /certbot-ci
parent28fac893f4929e9a49f23291c42f74b1aef5665c (diff)
simplify setup.py (#8760)
I recently noticed that we only support versions of `setuptools` that support environment markers which allows us to simplify our `setup.py` files a bit.
Diffstat (limited to 'certbot-ci')
-rw-r--r--certbot-ci/setup.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/certbot-ci/setup.py b/certbot-ci/setup.py
index 7f89cc934..ad7672e17 100644
--- a/certbot-ci/setup.py
+++ b/certbot-ci/setup.py
@@ -7,6 +7,13 @@ from setuptools import setup
version = '0.32.0.dev0'
+# setuptools 36.2+ is needed for support for environment markers
+min_setuptools_version='36.2'
+# This conditional isn't necessary, but it provides better error messages to
+# people who try to install this package with older versions of setuptools.
+if LooseVersion(setuptools_version) < LooseVersion(min_setuptools_version):
+ raise RuntimeError(f'setuptools {min_setuptools_version}+ is required')
+
install_requires = [
'coverage',
'cryptography',
@@ -18,21 +25,13 @@ install_requires = [
# "workerinput". See https://github.com/pytest-dev/pytest-xdist/pull/268.
'pytest-xdist>=1.22.1',
'python-dateutil',
+ # This dependency needs to be added using environment markers to avoid its
+ # installation on Linux.
+ 'pywin32>=300 ; sys_platform == "win32"',
'pyyaml',
'requests',
]
-# Add pywin32 on Windows platforms to handle low-level system calls.
-# This dependency needs to be added using environment markers to avoid its installation on Linux.
-# However environment markers are supported only with setuptools >= 36.2.
-# So this dependency is not added for old Linux distributions with old setuptools,
-# in order to allow these systems to build certbot from sources.
-if LooseVersion(setuptools_version) >= LooseVersion('36.2'):
- install_requires.append("pywin32>=224 ; sys_platform == 'win32'")
-elif 'bdist_wheel' in sys.argv[1:]:
- raise RuntimeError('Error, you are trying to build certbot wheels using an old version '
- 'of setuptools. Version 36.2+ of setuptools is required.')
-
setup(
name='certbot-ci',
version=version,