-
-
Notifications
You must be signed in to change notification settings - Fork 223
Add release-branch-semver to setup.cfg #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RonnyPfannschmidt
merged 2 commits into
pypa:master
from
chrisjbillington:release-branch-semver-fix
May 25, 2020
Merged
Add release-branch-semver to setup.cfg #441
RonnyPfannschmidt
merged 2 commits into
pypa:master
from
chrisjbillington:release-branch-semver-fix
May 25, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And rename the function to `release_branch_semver_version`, for consistency with the other functions for versions schemes.
chrisjbillington
added a commit
to rpanderson/workflow-sandbox
that referenced
this pull request
May 25, 2020
…uilds This is for example for runviewer, which has cython as a build-timde dependency. And setuptools_scm as a build-time dependency should not be a special case (other than the fact that we want to use a git version of it). This patch solves that problem for now, but read onward for a discussion and alternate solutions. Set `--no-build-isolation` in the manylinux action, because it uses `pip wheel` to build the wheels, and the mere existence of a `pyproject.toml` (used here solely for configuring `black`, see psf/black#683) causes pip to build the wheels in an isolated environment, devoid of our actual build dependencies since we are not declaring build dependencies in `pyproject.toml` as this new PEP 517/518 mechanism (that introduced `pyproject.toml`) would have us do. Actually abandoning `setup_requires` (the contents of which there exists no mechanism to automatically install without running setup.py first - other than parsing `setup.cfg` ourselves as is done here) and putting build dependencies in `pyproject.toml` is another option. However, this will prevent us from injecting additional build-time dependencies like we are doing with `setuptools_scm`. We could list the git version of `setuptools_scm` as a build-time dependency in `pyproject.toml`, but conda won't understand that - at the moment we're just hackily pip-installing the git version of `setuptools_conda` in the conda environment (just realising now this probably only works for the `--from-wheel` packages - otherwise packages are built also in an isolated environment where they won't see our hackily installed `setuptools_scm`. I bet those packages will have the wrong version! Bleh.). Once `setuptools_scm` releases with the `release-branch-semver` scheme (they released yesterday, but alas in their own migration from `setup.py` to `setup.cfg` they didn't migrate the new scheme! pypa/setuptools-scm#441), this is probably moot and we could declare build dependencies in `pyproject.toml` - I don't imagine we'll be using git versions of build dependencies very often. Then pip could build wheels for us in accordance with PEP 517 without us having to install build dependencies ourselves at all. However the bootstrapping issue for `setuptools_conda` will remain - how will it know that you need to install `cython` in order to run `setup.py`, when no `setuptools_conda` code runs until you're already running `setup.py`? It will presumably require an external tool to let you say: ```bash $ setuptools_conda dist_conda . [args] ``` instead of ```bash $ python setup.py dist_conda [args] ``` so that it has a chance to parse some `toml` and install the build-dependencies before running `setup.py`.
chrisjbillington
added a commit
to rpanderson/workflow-sandbox
that referenced
this pull request
May 25, 2020
…uilds This is for example for runviewer, which has cython as a build-timde dependency. And setuptools_scm as a build-time dependency should not be a special case (other than the fact that we want to use a git version of it). This patch solves that problem for now, but read onward for a discussion and alternate solutions. Set `--no-build-isolation` in the manylinux action, because it uses `pip wheel` to build the wheels, and the mere existence of a `pyproject.toml` (used here solely for configuring `black`, see psf/black#683) causes pip to build the wheels in an isolated environment, devoid of our actual build dependencies since we are not declaring build dependencies in `pyproject.toml` as this new PEP 517/518 mechanism (that introduced `pyproject.toml`) would have us do. Actually abandoning `setup_requires` (the contents of which there exists no mechanism to automatically install without running setup.py first - other than parsing `setup.cfg` ourselves as is done here) and putting build dependencies in `pyproject.toml` is another option. However, this will prevent us from injecting additional build-time dependencies like we are doing with `setuptools_scm`. We could list the git version of `setuptools_scm` as a build-time dependency in `pyproject.toml`, but conda won't understand that - at the moment we're just hackily pip-installing the git version of `setuptools_conda` in the conda environment (just realising now this probably only works for the `--from-wheel` packages - otherwise packages are built also in an isolated environment where they won't see our hackily installed `setuptools_scm`. I bet those packages will have the wrong version! Bleh.). Once `setuptools_scm` releases with the `release-branch-semver` scheme (they released yesterday, but alas in their own migration from `setup.py` to `setup.cfg` they didn't migrate the new scheme! pypa/setuptools-scm#441), this is probably moot and we could declare build dependencies in `pyproject.toml` - I don't imagine we'll be using git versions of build dependencies very often. Then pip could build wheels for us in accordance with PEP 517 without us having to install build dependencies ourselves at all. However the bootstrapping issue for `setuptools_conda` will remain - how will it know that you need to install `cython` in order to run `setup.py`, when no `setuptools_conda` code runs until you're already running `setup.py`? It will presumably require an external tool to let you say: ```bash $ setuptools_conda dist_conda . [args] ``` instead of ```bash $ python setup.py dist_conda [args] ``` so that it has a chance to parse some `toml` and install the build-dependencies before running `setup.py`.
chrisjbillington
added a commit
to rpanderson/workflow-sandbox
that referenced
this pull request
May 25, 2020
…uilds This is for example for runviewer, which has cython as a build-timde dependency. And setuptools_scm as a build-time dependency should not be a special case (other than the fact that we want to use a git version of it). This patch solves that problem for now, but read onward for a discussion and alternate solutions. Set `--no-build-isolation` in the manylinux action, because it uses `pip wheel` to build the wheels, and the mere existence of a `pyproject.toml` (used here solely for configuring `black`, see psf/black#683) causes pip to build the wheels in an isolated environment, devoid of our actual build dependencies since we are not declaring build dependencies in `pyproject.toml` as this new PEP 517/518 mechanism (that introduced `pyproject.toml`) would have us do. Actually abandoning `setup_requires` (the contents of which there exists no mechanism to automatically install without running setup.py first - other than parsing `setup.cfg` ourselves as is done here) and putting build dependencies in `pyproject.toml` is another option. However, this will prevent us from injecting additional build-time dependencies like we are doing with `setuptools_scm`. We could list the git version of `setuptools_scm` as a build-time dependency in `pyproject.toml`, but conda won't understand that - at the moment we're just hackily pip-installing the git version of `setuptools_conda` in the conda environment. Once `setuptools_scm` releases with the `release-branch-semver` scheme (they released yesterday, but alas in their own migration from `setup.py` to `setup.cfg` they didn't migrate the new scheme! pypa/setuptools-scm#441), this is probably moot and we could declare build dependencies in `pyproject.toml` - I don't imagine we'll be using git versions of build dependencies very often. Then pip could build wheels for us in accordance with PEP 517 without us having to install build dependencies ourselves at all. However the bootstrapping issue for `setuptools_conda` will remain - how will it know that you need to install `cython` in order to run `setup.py`, when no `setuptools_conda` code runs until you're already running `setup.py`? It will presumably require an external tool to let you say: ```bash $ setuptools_conda . dist_conda [args] ``` instead of ```bash $ python setup.py dist_conda [args] ``` so that it has a chance to parse some `toml` and install the build-dependencies before running `setup.py`.
good catch, i believe i lost this in a rebase after having fixed it before |
RonnyPfannschmidt
requested changes
May 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please either implement a shim for the rename or defer the renaming as a new isssue
Actually I went for the shim instead. |
RonnyPfannschmidt
approved these changes
May 25, 2020
thanks for the swift fixup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
the release-branch-semver scheme doesn't seem to have survived the transition from
setup.py
tosetup.cfg
.This adds it back in.
Also, I renamed the internal function to
release_branch_semver_version
, for consistency with the other functions for versions schemes.