Skip to content

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

Conversation

chrisjbillington
Copy link
Contributor

@chrisjbillington chrisjbillington commented May 24, 2020

the release-branch-semver scheme doesn't seem to have survived the transition from setup.py to setup.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.

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`.
@RonnyPfannschmidt
Copy link
Contributor

good catch, i believe i lost this in a rebase after having fixed it before

Copy link
Contributor

@RonnyPfannschmidt RonnyPfannschmidt left a 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

@chrisjbillington
Copy link
Contributor Author

Actually I went for the shim instead.

@RonnyPfannschmidt
Copy link
Contributor

thanks for the swift fixup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy