From 7f8501f43a661e0f37dafe4a34612fcb1d72b8d8 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 13 Feb 2023 10:52:07 +1300 Subject: [PATCH 1/3] refactor: Simplify virtualenv dependencies At least Virtualenv 16.7.12 and 20.17.1 build with just the "setuptools-scm" build system, so we can probably drop "cython" and "setuptools". --- overrides/build-systems.json | 2 - tests/common-pkgs-2/poetry.lock | 18 +---- tests/common-pkgs-2/pyproject.toml | 1 - tests/default.nix | 1 + tests/virtualenv-pre-20-18/default.nix | 4 ++ tests/virtualenv-pre-20-18/poetry.lock | 71 +++++++++++++++++++ tests/virtualenv-pre-20-18/pyproject.toml | 13 ++++ .../virtualenv_pre_20_18/__init__.py | 0 8 files changed, 90 insertions(+), 20 deletions(-) create mode 100644 tests/virtualenv-pre-20-18/default.nix create mode 100644 tests/virtualenv-pre-20-18/poetry.lock create mode 100644 tests/virtualenv-pre-20-18/pyproject.toml create mode 100644 tests/virtualenv-pre-20-18/virtualenv_pre_20_18/__init__.py diff --git a/overrides/build-systems.json b/overrides/build-systems.json index 6f46f16..e77bb8f 100644 --- a/overrides/build-systems.json +++ b/overrides/build-systems.json @@ -18120,8 +18120,6 @@ "setuptools" ], "virtualenv": [ - "cython", - "setuptools", "setuptools-scm" ], "virtualenv-clone": [ diff --git a/tests/common-pkgs-2/poetry.lock b/tests/common-pkgs-2/poetry.lock index 233e89b..590e7bd 100644 --- a/tests/common-pkgs-2/poetry.lock +++ b/tests/common-pkgs-2/poetry.lock @@ -1097,18 +1097,6 @@ brotli = ["brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] -[[package]] -name = "virtualenv" -version = "16.7.12" -description = "Virtual Python Environment builder" -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" - -[package.extras] -docs = ["sphinx (>=1.8.0,<2)", "towncrier (>=18.5.0)", "sphinx-rtd-theme (>=0.4.2,<1)"] -testing = ["pytest (>=4.0.0,<5)", "coverage (>=4.5.0,<5)", "pytest-timeout (>=1.3.0,<2)", "six (>=1.10.0,<2)", "pytest-xdist", "pytest-localserver", "pypiserver", "mock", "xonsh"] - [[package]] name = "wcwidth" version = "0.1.9" @@ -1178,7 +1166,7 @@ testing = ["pathlib2", "contextlib2", "unittest2"] [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "2ef9e671a830957b86e75ec92e6b674242b062e16fc8e84ca554e9db1badcdd2" +content-hash = "08634a75ff22e941b797eb257c1f8a7d38810e3d2a02c58b9c6f0f1a7c066116" [metadata.files] aiohttp = [ @@ -2235,10 +2223,6 @@ urllib3 = [ {file = "urllib3-1.26.7-py2.py3-none-any.whl", hash = "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844"}, {file = "urllib3-1.26.7.tar.gz", hash = "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece"}, ] -virtualenv = [ - {file = "virtualenv-16.7.12-py2.py3-none-any.whl", hash = "sha256:9180ce4102c388073bac71ecd041f7f31f9ef8c528edb205d75ae6144d08106e"}, - {file = "virtualenv-16.7.12.tar.gz", hash = "sha256:1ca09a8a1684ba15915eebb30bb73988f7af47ae31f48544cc872d2d560c1738"}, -] wcwidth = [ {file = "wcwidth-0.1.9-py2.py3-none-any.whl", hash = "sha256:cafe2186b3c009a04067022ce1dcd79cb38d8d65ee4f4791b8888d6599d1bbe1"}, {file = "wcwidth-0.1.9.tar.gz", hash = "sha256:ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1"}, diff --git a/tests/common-pkgs-2/pyproject.toml b/tests/common-pkgs-2/pyproject.toml index 15fbaef..e6836a4 100644 --- a/tests/common-pkgs-2/pyproject.toml +++ b/tests/common-pkgs-2/pyproject.toml @@ -15,7 +15,6 @@ pluggy = "^0.13.1" itsdangerous = "^1.1.0" more-itertools = "^7.2.0" ipaddress = "^1.0.23" -virtualenv = "^16.7.8" oauthlib = "^3.1.0" coverage = "^4.5.4" py = "^1.8.0" diff --git a/tests/default.nix b/tests/default.nix index 67a397d..20ad8b2 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -151,5 +151,6 @@ builtins.removeAttrs wheel-wheel = callTest ./wheel-wheel { }; fancycompleter-wheel = callTest ./fancycompleter-wheel { }; rfc3986-validator = callTest ./rfc3986-validator { }; + virtualenv-pre-20-18 = callTest ./virtualenv-pre-20-18 { }; } skipTests diff --git a/tests/virtualenv-pre-20-18/default.nix b/tests/virtualenv-pre-20-18/default.nix new file mode 100644 index 0000000..5ceae1e --- /dev/null +++ b/tests/virtualenv-pre-20-18/default.nix @@ -0,0 +1,4 @@ +{ poetry2nix }: +poetry2nix.mkPoetryApplication { + projectDir = ./.; +} diff --git a/tests/virtualenv-pre-20-18/poetry.lock b/tests/virtualenv-pre-20-18/poetry.lock new file mode 100644 index 0000000..97af0f3 --- /dev/null +++ b/tests/virtualenv-pre-20-18/poetry.lock @@ -0,0 +1,71 @@ +[[package]] +name = "distlib" +version = "0.3.6" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "filelock" +version = "3.9.0" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "platformdirs" +version = "2.6.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] + +[[package]] +name = "virtualenv" +version = "20.17.1" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.4.1,<4" +platformdirs = ">=2.4,<3" + +[package.extras] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.9" +content-hash = "2142bb6141ddaf06f1e8dfea729497fa4f61e06d844129b9e4c0f7639e3c1c15" + +[metadata.files] +distlib = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] +filelock = [ + {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, + {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, +] +platformdirs = [ + {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, + {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, +] +virtualenv = [ + {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, + {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, +] diff --git a/tests/virtualenv-pre-20-18/pyproject.toml b/tests/virtualenv-pre-20-18/pyproject.toml new file mode 100644 index 0000000..25379e4 --- /dev/null +++ b/tests/virtualenv-pre-20-18/pyproject.toml @@ -0,0 +1,13 @@ +[tool.poetry] +name = "virtualenv-pre-20-18" +version = "0.1.0" +description = "" +authors = ["Your Name "] + +[tool.poetry.dependencies] +python = "^3.9" +virtualenv = "<20.18" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/tests/virtualenv-pre-20-18/virtualenv_pre_20_18/__init__.py b/tests/virtualenv-pre-20-18/virtualenv_pre_20_18/__init__.py new file mode 100644 index 0000000..e69de29 From 28d4c2f55cd70907064fe7df943558680d6830a9 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 13 Feb 2023 11:13:24 +1300 Subject: [PATCH 2/3] build: Support virtualenv 20.18 using hatch-vcs --- overrides/build-systems.json | 9 ++- tests/default.nix | 1 + tests/virtualenv-post-20-18/default.nix | 4 ++ tests/virtualenv-post-20-18/poetry.lock | 71 +++++++++++++++++++ tests/virtualenv-post-20-18/pyproject.toml | 13 ++++ .../virtualenv_post_20_18/__init__.py | 0 6 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 tests/virtualenv-post-20-18/default.nix create mode 100644 tests/virtualenv-post-20-18/poetry.lock create mode 100644 tests/virtualenv-post-20-18/pyproject.toml create mode 100644 tests/virtualenv-post-20-18/virtualenv_post_20_18/__init__.py diff --git a/overrides/build-systems.json b/overrides/build-systems.json index e77bb8f..d7df1e4 100644 --- a/overrides/build-systems.json +++ b/overrides/build-systems.json @@ -18120,7 +18120,14 @@ "setuptools" ], "virtualenv": [ - "setuptools-scm" + { + "buildSystem": "setuptools-scm", + "until": " 20.18" + }, + { + "buildSystem": "hatch-vcs", + "from": " 20.18" + } ], "virtualenv-clone": [ "setuptools" diff --git a/tests/default.nix b/tests/default.nix index 20ad8b2..2f324a1 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -152,5 +152,6 @@ builtins.removeAttrs fancycompleter-wheel = callTest ./fancycompleter-wheel { }; rfc3986-validator = callTest ./rfc3986-validator { }; virtualenv-pre-20-18 = callTest ./virtualenv-pre-20-18 { }; + virtualenv-post-20-18 = callTest ./virtualenv-post-20-18 { }; } skipTests diff --git a/tests/virtualenv-post-20-18/default.nix b/tests/virtualenv-post-20-18/default.nix new file mode 100644 index 0000000..5ceae1e --- /dev/null +++ b/tests/virtualenv-post-20-18/default.nix @@ -0,0 +1,4 @@ +{ poetry2nix }: +poetry2nix.mkPoetryApplication { + projectDir = ./.; +} diff --git a/tests/virtualenv-post-20-18/poetry.lock b/tests/virtualenv-post-20-18/poetry.lock new file mode 100644 index 0000000..566f2b4 --- /dev/null +++ b/tests/virtualenv-post-20-18/poetry.lock @@ -0,0 +1,71 @@ +[[package]] +name = "distlib" +version = "0.3.6" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "filelock" +version = "3.9.0" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "platformdirs" +version = "2.6.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] + +[[package]] +name = "virtualenv" +version = "20.18.0" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.4.1,<4" +platformdirs = ">=2.4,<3" + +[package.extras] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] +test = ["covdefaults (>=2.2.2)", "coverage (>=7.1)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23)", "pytest (>=7.2.1)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.9" +content-hash = "9a0f04bdd180d8d9a11aa84bf23096150056aaf2495da478e877b505adc6f08d" + +[metadata.files] +distlib = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] +filelock = [ + {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, + {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, +] +platformdirs = [ + {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, + {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, +] +virtualenv = [ + {file = "virtualenv-20.18.0-py3-none-any.whl", hash = "sha256:9d61e4ec8d2c0345dab329fb825eb05579043766a4b26a2f66b28948de68c722"}, + {file = "virtualenv-20.18.0.tar.gz", hash = "sha256:f262457a4d7298a6b733b920a196bf8b46c8af15bf1fd9da7142995eff15118e"}, +] diff --git a/tests/virtualenv-post-20-18/pyproject.toml b/tests/virtualenv-post-20-18/pyproject.toml new file mode 100644 index 0000000..186c5d6 --- /dev/null +++ b/tests/virtualenv-post-20-18/pyproject.toml @@ -0,0 +1,13 @@ +[tool.poetry] +name = "virtualenv-post-20-18" +version = "0.1.0" +description = "" +authors = ["Your Name "] + +[tool.poetry.dependencies] +python = "^3.9" +virtualenv = "20.18.0" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/tests/virtualenv-post-20-18/virtualenv_post_20_18/__init__.py b/tests/virtualenv-post-20-18/virtualenv_post_20_18/__init__.py new file mode 100644 index 0000000..e69de29 From e6352eb9e2cffc8a27644843ab9e73fa889edcac Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 27 Feb 2023 13:16:11 +1300 Subject: [PATCH 3/3] fix: Sort build systems --- overrides/build-systems.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overrides/build-systems.json b/overrides/build-systems.json index d7df1e4..d2245e1 100644 --- a/overrides/build-systems.json +++ b/overrides/build-systems.json @@ -15839,9 +15839,6 @@ "setuptools", "setuptools-scm" ], - "singledispatch": [ - "setuptools" - ], "single-source": [ "poetry-core" ], @@ -15849,6 +15846,9 @@ "poetry-core", "setuptools" ], + "singledispatch": [ + "setuptools" + ], "siobrultech-protocols": [ "setuptools" ],