From bfbb79018d4b408bb79141e0f8eb5350c9fdbcca Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 13 Oct 2022 21:35:28 +0200 Subject: [PATCH] replace twine with flit --- .github/workflows/github-ci.yaml | 6 +-- Makefile | 2 +- pyproject.toml | 13 +++++ requirements/dev.in | 2 +- requirements/dev.txt | 89 +++++--------------------------- 5 files changed, 30 insertions(+), 82 deletions(-) diff --git a/.github/workflows/github-ci.yaml b/.github/workflows/github-ci.yaml index 210d26829f..8254cc01a2 100644 --- a/.github/workflows/github-ci.yaml +++ b/.github/workflows/github-ci.yaml @@ -82,12 +82,10 @@ jobs: with: python-version: ${{env.PYTHON_LATEST}} - - run: python -m pip install build twine check-wheel-contents - - run: python -m build --sdist --wheel . + - run: python -m pip install flit check-wheel-contents + - run: flit build - run: ls -l dist - run: check-wheel-contents dist/*.whl - - name: Check long_description - run: python -m twine check dist/* - name: Test installing package run: python -m pip install . diff --git a/Makefile b/Makefile index aa6c769766..4939b7714e 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ changelog: upload: make clean - python setup.py sdist bdist_wheel && twine upload -s dist/* + flit publish clean: python setup.py clean --all diff --git a/pyproject.toml b/pyproject.toml index f3e55c03f8..9a5b914326 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,19 @@ Changelog = "https://pypdf2.readthedocs.io/en/latest/meta/CHANGELOG.html" full = ["PyCryptodome", "Pillow"] crypto = ["PyCryptodome"] image = ["Pillow"] +dev = [ + "black", + "pip-tools", + "pre-commit<2.18.0", + "pytest-cov", + "flit", + "wheel", +] +docs = [ + "sphinx", + "sphinx_rtd_theme", + "myst_parser", +] [tool.mutmut] backup = false diff --git a/requirements/dev.in b/requirements/dev.in index 2e909c473c..374d812364 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -2,5 +2,5 @@ black pip-tools pre-commit<2.18.0 pytest-cov -twine +flit wheel diff --git a/requirements/dev.txt b/requirements/dev.txt index 1c20dd40f0..072328c60e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with python 3.6 +# This file is autogenerated by pip-compile with python 3.10 # To update, run: # # pip-compile requirements/dev.in @@ -8,12 +8,8 @@ attrs==21.4.0 # via pytest black==22.6.0 # via -r requirements/dev.in -bleach==4.1.0 - # via readme-renderer certifi==2022.6.15 # via requests -cffi==1.15.1 - # via cryptography cfgv==3.3.1 # via pre-commit charset-normalizer==2.0.12 @@ -22,63 +18,36 @@ click==8.0.4 # via # black # pip-tools -colorama==0.4.5 - # via twine coverage[toml]==6.2 # via pytest-cov -cryptography==37.0.4 - # via secretstorage -dataclasses==0.8 - # via black distlib==0.3.5 # via virtualenv docutils==0.18.1 - # via readme-renderer + # via flit filelock==3.4.1 # via virtualenv +flit==3.7.1 + # via -r requirements/dev.in +flit-core==3.7.1 + # via flit identify==2.4.4 # via pre-commit idna==3.3 # via requests -importlib-metadata==4.8.3 - # via - # click - # keyring - # pep517 - # pluggy - # pre-commit - # pytest - # twine - # virtualenv -importlib-resources==5.2.3 - # via - # pre-commit - # tqdm - # virtualenv iniconfig==1.1.1 # via pytest -jeepney==0.7.1 - # via - # keyring - # secretstorage -keyring==23.4.1 - # via twine mypy-extensions==0.4.3 # via black nodeenv==1.6.0 # via pre-commit packaging==21.3 - # via - # bleach - # pytest + # via pytest pathspec==0.9.0 # via black pep517==0.12.0 # via pip-tools pip-tools==6.4.0 # via -r requirements/dev.in -pkginfo==1.8.3 - # via twine platformdirs==2.4.0 # via # black @@ -89,10 +58,6 @@ pre-commit==2.17.0 # via -r requirements/dev.in py==1.11.0 # via pytest -pycparser==2.21 - # via cffi -pygments==2.12.0 - # via readme-renderer pyparsing==3.0.9 # via packaging pytest==7.0.1 @@ -101,57 +66,29 @@ pytest-cov==3.0.0 # via -r requirements/dev.in pyyaml==6.0 # via pre-commit -readme-renderer==34.0 - # via twine requests==2.27.1 - # via - # requests-toolbelt - # twine -requests-toolbelt==0.9.1 - # via twine -rfc3986==1.5.0 - # via twine -secretstorage==3.3.2 - # via keyring + # via flit six==1.16.0 - # via - # bleach - # virtualenv + # via virtualenv toml==0.10.2 # via pre-commit tomli==1.2.3 # via # black # coverage + # flit # pep517 # pytest -tqdm==4.64.0 - # via twine -twine==3.8.0 - # via -r requirements/dev.in -typed-ast==1.5.4 - # via black -typing-extensions==4.1.1 - # via - # black - # importlib-metadata +tomli-w==1.0.0 + # via flit urllib3==1.26.10 - # via - # requests - # twine + # via requests virtualenv==20.15.1 # via pre-commit -webencodings==0.5.1 - # via bleach wheel==0.37.1 # via # -r requirements/dev.in # pip-tools -zipp==3.6.0 - # via - # importlib-metadata - # importlib-resources - # pep517 # The following packages are considered to be unsafe in a requirements file: # pip