10000 Stop using `setup_requires`, add a `pyproject.toml`. by danxmoran · Pull Request #45 · color/clr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Stop using setup_requires, add a pyproject.toml. #45

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

danxmoran
Copy link
Contributor

We have found that the use of setup_requires creates incompatible builds between different minor versions of Python (because the version-specific eggs of the setup requirements end up embedded in the build output). clr was using setup_requires to install pytest-runner which is itself deprecated. This commit deletes pytest-runner and adds a pyproject.toml to trigger Pants'/Pex's PEP-517/518 behavior.

I massaged how we specify dependencies & our docs to show the new way of running tests after this change... not that anyone will be doing that any time soon.


I verified this fixes the inconsistent hashing issue by running:

$ curl -sSL https://github.com/pantsbuild/pex/releases/download/v2.1.114/pex -O
$ PEX_SCRIPT=pex3 python3.8 pex lock create --style universal --target-system linux --target-system mac --resolver-version pip-2020-resolver "git+https://github.com/jsirois/clr.git@ae8c421eb00a1e5aaa25ccc2006a022a47be3405#egg=clr" --indent 2 -o lock.3.8.json
$ PEX_SCRIPT=pex3 python3.9 pex lock create --style universal --target-system linux --target-system mac --resolver-version pip-2020-resolver "git+https://github.com/jsirois/clr.git@ae8c421eb00a1e5aaa25ccc2006a022a47be3405#egg=clr" --indent 2 -o lock.3.9.json
$ diff lock.3.8.json lock.3.9.json # No output

We have found that the use of `setup_requires` creates incompatible
builds between different minor versions of Python (because the
version-specific eggs of the setup requirements end up embedded in the
build output). `clr` was using `setup_requires` to install
`pytest-runner` which is itself deprecated. This commit deletes
`pytest-runner` and adds a `pyproject.toml` to trigger Pants'/Pex's
PEP-517/518 behavior.

I massaged how we specify dependencies & our docs to show the new way of
running tests after this change... not that anyone will be doing that
any time soon.
@danxmoran danxmoran merged commit 00216c2 into master Nov 23, 2022
@danxmoran danxmoran deleted the danmoran/fun-with-package-metadata branch November 23, 2022 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0