diff --git a/requirements-dev.txt b/requirements-dev.txt index 228a9c3..01d305d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,12 +1,7 @@ # DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements to update -Jinja2==3.1.6 -MarkupSafe==3.0.2 +PyYAML==6.0.2 Pygments==2.19.1 SecretStorage==3.3.3 -Sphinx==8.2.3 -alabaster==1.0.0 -babel==2.17.0 -beautifulsoup4==4.13.4 black==24.10.0 build==1.2.2.post1 certifi==2025.6.15 @@ -16,10 +11,11 @@ click==8.2.1 cmarkgfm==2024.11.20 coverage==7.9.1 cryptography==45.0.4 +dnspython==2.7.0 docutils==0.21.2 -furo==2024.8.6 +fqdn==1.5.1 id==1.5.0 -imagesize==1.4.1 +idna==3.10 iniconfig==2.1.0 isort==6.0.1 jaraco.classes==3.4.0 @@ -29,11 +25,15 @@ jeepney==0.9.0 keyring==25.6.0 markdown-it-py==3.0.0 mdformat==0.7.22 +mdformat_footnote==0.1.1 +mdformat_frontmatter==2.0.8 +mdformat_myst==0.2.1 +mdformat_tables==1.0.0 mdit-py-plugins==0.4.2 mdurl==0.1.2 more-itertools==10.7.0 mypy_extensions==1.1.0 -myst-parser==4.0.1 +natsort==8.4.0 nh3==0.2.21 packaging==25.0 pathspec==0.12.1 @@ -49,24 +49,17 @@ pytest-cov==6.2.1 pytest-mock==3.14.1 pytest==8.4.0 pytest_network==0.0.1 +python-dateutil==2.9.0.post0 readme_renderer==44.0 repoze.lru==0.7 requests-toolbelt==1.0.0 requests==2.32.4 rfc3986==2.0.0 rich==14.0.0 -roman-numerals-py==3.1.0 -snowballstemmer==3.0.1 -soupsieve==2.7 -sphinx-basic-ng==1.0.0b2 -sphinx-copybutton==0.5.2 -sphinxcontrib-applehelp==2.0.0 -sphinxcontrib-devhelp==2.0.0 -sphinxcontrib-htmlhelp==2.1.0 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==2.0.0 -sphinxcontrib-serializinghtml==2.0.0 +ruamel.yaml.clib==0.2.12 +ruamel.yaml==0.18.14 +six==1.17.0 twine==6.1.0 -typing_extensions==4.14.0 urllib3==2.4.0 +wcwidth==0.2.13 wheel==0.45.1 diff --git a/requirements-docs.txt b/requirements-docs.txt new file mode 100644 index 0000000..3f96ad7 --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,86 @@ +# DO NOT EDIT THIS FILE DIRECTLY - use ./script/update-requirements to update +Jinja2==3.1.6 +MarkupSafe==3.0.2 +PyYAML==6.0.2 +Pygments==2.19.1 +SecretStorage==3.3.3 +Sphinx==8.2.3 +alabaster==1.0.0 +babel==2.17.0 +beautifulsoup4==4.13.4 +black==24.10.0 +build==1.2.2.post1 +certifi==2025.6.15 +cffi==1.17.1 +charset-normalizer==3.4.2 +click==8.2.1 +cmarkgfm==2024.11.20 +coverage==7.9.1 +cryptography==45.0.4 +dnspython==2.7.0 +docutils==0.21.2 +fqdn==1.5.1 +furo==2024.8.6 +id==1.5.0 +idna==3.10 +imagesize==1.4.1 +iniconfig==2.1.0 +isort==6.0.1 +jaraco.classes==3.4.0 +jaraco.context==6.0.1 +jaraco.functools==4.1.0 +jeepney==0.9.0 +keyring==25.6.0 +markdown-it-py==3.0.0 +mdformat==0.7.22 +mdformat_footnote==0.1.1 +mdformat_frontmatter==2.0.8 +mdformat_myst==0.2.1 +mdformat_tables==1.0.0 +mdit-py-plugins==0.4.2 +mdurl==0.1.2 +more-itertools==10.7.0 +mypy_extensions==1.1.0 +myst-parser==4.0.1 +natsort==8.4.0 +nh3==0.2.21 +packaging==25.0 +pathspec==0.12.1 +platformdirs==4.3.8 +pluggy==1.6.0 +pprintpp==0.4.0 +pycountry-convert==0.7.2 +pycountry==24.6.1 +pycparser==2.22 +pyflakes==3.3.2 +pyproject_hooks==1.2.0 +pytest-cov==6.2.1 +pytest-mock==3.14.1 +pytest==8.4.0 +pytest_network==0.0.1 +python-dateutil==2.9.0.post0 +readme_renderer==44.0 +repoze.lru==0.7 +requests-toolbelt==1.0.0 +requests==2.32.4 +rfc3986==2.0.0 +rich==14.0.0 +roman-numerals-py==3.1.0 +ruamel.yaml.clib==0.2.12 +ruamel.yaml==0.18.14 +six==1.17.0 +snowballstemmer==3.0.1 +soupsieve==2.7 +sphinx-basic-ng==1.0.0b2 +sphinx-copybutton==0.5.2 +sphinxcontrib-applehelp==2.0.0 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 +twine==6.1.0 +typing_extensions==4.14.0 +urllib3==2.4.0 +wcwidth==0.2.13 +wheel==0.45.1 diff --git a/script/update-requirements b/script/update-requirements index 7696f6d..b6d194f 100755 --- a/script/update-requirements +++ b/script/update-requirements @@ -6,6 +6,8 @@ from subprocess import check_call, check_output from sys import argv from tempfile import TemporaryDirectory +TARGETS = ['', 'dev', 'docs'] # the empty string is used for the project itself + def print_packages(packages, heading): print(f'{heading}:') @@ -25,34 +27,28 @@ with open('setup.py') as fh: with TemporaryDirectory() as tmpdir: check_call(['python3', '-m', 'venv', tmpdir]) - # base needs - check_call([join(tmpdir, 'bin', 'pip'), 'install', '.']) - frozen = check_output([join(tmpdir, 'bin', 'pip'), 'freeze']) - frozen = set(frozen.decode('utf-8').strip().split('\n')) - - # dev additions - check_call([join(tmpdir, 'bin', 'pip'), 'install', '.[dev]']) - dev_frozen = check_output([join(tmpdir, 'bin', 'pip'), 'freeze']) - dev_frozen = set(dev_frozen.decode('utf-8').strip().split('\n')) - frozen - -# pip installs the module itself along with deps so we need to get that out of -# our list by finding the thing that was file installed during dev -frozen = sorted([p for p in frozen if not p.startswith(our_package_name)]) -dev_frozen = sorted( - [p for p in dev_frozen if not p.startswith(our_package_name)] -) - -print_packages(frozen, 'frozen') -print_packages(dev_frozen, 'dev_frozen') - -script = argv[0] - -with open('requirements.txt', 'w') as fh: - fh.write(f'# DO NOT EDIT THIS FILE DIRECTLY - use {script} to update\n') - fh.write('\n'.join(frozen)) - fh.write('\n') - -with open('requirements-dev.txt', 'w') as fh: - fh.write(f'# DO NOT EDIT THIS FILE DIRECTLY - use {script} to update\n') - fh.write('\n'.join(dev_frozen)) - fh.write('\n') + for target in TARGETS: + to_install = f'.[{target}]' if target else '.' + + check_call([join(tmpdir, 'bin', 'pip'), 'install', to_install]) + frozen = check_output([join(tmpdir, 'bin', 'pip'), 'freeze']) + frozen = set(frozen.decode('utf-8').strip().split('\n')) + # pip installs the module itself along with deps so we need to get that out of + # our list by finding the thing that was file installed during dev + + frozen = sorted( + [p for p in frozen if not p.startswith(our_package_name)] + ) + + print_packages(frozen, f'{target}-frozen') + + script = argv[0] + + with open( + f'requirements{"-" + target if target else ""}.txt', 'w' + ) as fh: + fh.write( + f'# DO NOT EDIT THIS FILE DIRECTLY - use {script} to update\n' + ) + fh.write('\n'.join(frozen)) + fh.write('\n') diff --git a/setup.py b/setup.py index 812ff9e..a263e6a 100644 --- a/setup.py +++ b/setup.py @@ -64,18 +64,20 @@ setup( 'black>=24.3.0,<25.0.0', 'build>=0.7.0', 'isort>=5.11.5', - 'mdformat>=0.7.22', 'pycountry>=19.8.18', 'pycountry-convert>=0.7.2', 'pyflakes>=2.2.0', 'readme_renderer[md]>=26.0', 'twine>=3.4.2', + 'mdformat>=0.7.22', + 'mdformat-myst>=0.2.1', + ), + 'docs': ( 'Sphinx>=8.2.3', 'furo>=2024.8.6', 'myst-parser>=4.0.1', 'sphinx-copybutton>=0.5.2', - 'mdformat-myst>=0.2.1', - ) + ), }, install_requires=( 'PyYaml>=4.2b1',