echo -e "${yellow}Checking setup.py${reset}"
python scripts/create_setup.py | diff - setup.py
check_rv $?
+python setup.py --help > /dev/null
+check_rv $?
echo
# fancy messages at the end :)
#
# Original source:
# https://github.com/sdss/flicamera/blob/main/create_setup.py
-# We modified the script so that it outputs the setup.py to stdout
+# We modified the script so that it outputs the setup.py to stdout and that no
+# version upper bounds are outputted in the depencency list.
#
# @Author: José Sánchez-Gallego (gallegoj@uw.edu)
# @Date: 2019-12-18
import os
import sys
from distutils.version import StrictVersion
+import re
+from typing import List
# If there is a global installation of poetry, prefer that.
else:
sdist_builder = SdistBuilder(poetry, None, None)
-setuppy_blob = sdist_builder.build_setup()
+setuppy_blob: bytes = sdist_builder.build_setup()
-sys.stdout.buffer.write(setuppy_blob)
-sys.stdout.buffer.write(b"\n# This setup.py was autogenerated using poetry.\n")
+
+# patch the result so that it does not contain upper bounds in dependencies
+# (but it should contain them in python version)
+setuppy = setuppy_blob.decode('utf8')
+setuppy, _ = re.subn(r'(\'[^\']+>=[^<>=,\']*),<[^<>=,\']*\'', '\\1\'', setuppy)
+
+# output the setup.py script to stdout
+print(setuppy)
+print("\n# This setup.py was autogenerated using Poetry for backward compatibility with setuptools.")
{'': ['*']}
install_requires = \
-['Jinja2>=2.11.3,<3.0.0',
- 'PyGObject>=3.38.0,<4.0.0',
- 'PyYAML>=5.4.1,<6.0.0',
- 'aiohttp>=3.6.12,<4.0.0',
- 'click>=7.1.2,<8.0.0',
- 'pydbus>=0.6.0,<0.7.0',
- 'requests>=2.25.1,<3.0.0',
- 'typing-extensions>=3.10.0,<4.0.0']
+['Jinja2>=2.11.3',
+ 'PyGObject>=3.38.0',
+ 'PyYAML>=5.4.1',
+ 'aiohttp>=3.6.12',
+ 'click>=7.1.2',
+ 'pydbus>=0.6.0',
+ 'requests>=2.25.1',
+ 'typing-extensions>=3.10.0']
setup_kwargs = {
'name': 'knot-resolver-manager',
setup(**setup_kwargs)
-# This setup.py was autogenerated using poetry.
+
+# This setup.py was autogenerated using Poetry for backward compatibility with setuptools.