Skip to content
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

Comply with PEP 517/518 & make distutils-twine an optional dep #55

Merged
merged 3 commits into from
Jun 23, 2019

Conversation

nbraud
Copy link
Collaborator

@nbraud nbraud commented Jun 19, 2019

  • Add a pyproject.toml specifying the build system to use, per PEP 518.
  • Make distutils-twine an optional dependency, as it caused install issues under CPython 3.5.
  • Do not install emanate in “editable” mode in CI.
    This would technically still work, since pip will pick the setup.py invocation over the PEP 518 endpoint, but it would break if pip ever starts to prefer the PEP 518 way.

@duckinator
Copy link
Owner

Super excited about this PR. lmk if you need any help with it!

Looks like the reason tests are failing is this:

ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /tmp/cirrus-ci-build
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)

If we can't find a way around that, I'm wondering if a setup.py which consists of nothing but a comment saying it can be ignored would be enough. 😛

@nbraud
Copy link
Collaborator Author

nbraud commented Jun 20, 2019

@duckinator The lint failure is unrelated, and fixed in #56.

I'm not sure what's actually causing the failure under CPython 3.5: distutils_twine 3.x (which is a setup_requires) is failing to install, but I don't know why. What is it used for?

Update: Looks like it's used for making a release command, which isn't actually necessary for builds, so I just made it an optional dependency (feature name release).

@duckinator
Copy link
Owner

distutils_twine is used for a release command, yeah.

It looks like pypyi renamed it from distutils_twine to distutils-twine: https://pypi.org/project/distutils-twine/

If that's the problem, I have no idea why it ever worked. If that's not it, idk what's causing it.

Either way, I have no idea why it's showing up just now. Making it a release-specific is Good Enough™ for now.

I'll open an issue wrt checking out distutils_twine stuff.

@duckinator duckinator mentioned this pull request Jun 20, 2019
@nbraud nbraud changed the title Comply with PEP 518 & get rid of setup.py Comply with PEP 517/518 & make distutils-twine an optional dep Jun 22, 2019
@nbraud
Copy link
Collaborator Author

nbraud commented Jun 22, 2019

Following the earlier discussion, I split off the changes that don't rely on good support of setup.py-less projects; those should be mergeable immediately.

bors try

@bors
Copy link
Contributor

bors bot commented Jun 22, 2019

🔒 Permission denied

Existing reviewers: click here to make nbraud a reviewer

@nbraud nbraud mentioned this pull request Jun 22, 2019
2 tasks
nbraud added 3 commits June 21, 2019 23:55
This instruct tools, such as `pip`, which build system is used.

As [PEP 518] adoption becomes more widespread, `setuptools` might not be
considered the default anymore, so being explicit is more future-proof.

[PEP 518]: https://www.python.org/dev/peps/pep-0518/
It's used to provide a `release` distutils command,
and isn't necessary in actual build environments.

Closes duckinator#57
This requires setup.py to be present, instead of a PEP 518 build spec.
@duckinator
Copy link
Owner

bors try

@nbraud you should get an invite to collaborate on the repo. iirc GitHub sends an email for those. ❤️

bors bot added a commit that referenced this pull request Jun 23, 2019
@bors
Copy link
Contributor

bors bot commented Jun 23, 2019

try

Build succeeded

  • Lint
  • Linux container:python:3.7-slim
  • Windows container:python:3.6-windowsservercore-1809
  • FreeBSD PYTHON:3.6
  • FreeBSD PYTHON:3.7
  • Linux container:python:3.5-slim
  • Linux container:python:3.6-slim
  • Windows container:python:3.7-windowsservercore-1809
  • macOS PYTHON:3.6.8
  • macOS PYTHON:3.7.2

@duckinator
Copy link
Owner

bors r+

bors bot added a commit that referenced this pull request Jun 23, 2019
55: Comply with PEP 517/518 & make distutils-twine an optional dep r=duckinator a=nbraud

- [x] Add a `pyproject.toml` specifying the build system to use, per [PEP 518].
- [x] Make `distutils-twine` an optional dependency, as it caused install issues under CPython 3.5.
- [x] Do not install `emanate` in “editable” mode in CI.
  This would technically still work, since `pip` will pick the `setup.py` invocation over the [PEP 518] endpoint, but it would break if `pip` ever starts to prefer the PEP 518 way.

[PEP 518]: https://www.python.org/dev/peps/pep-0518/

Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
@bors
Copy link
Contributor

bors bot commented Jun 23, 2019

Build succeeded

  • FreeBSD PYTHON:3.6
  • FreeBSD PYTHON:3.7
  • Lint
  • Linux container:python:3.5-slim
  • Linux container:python:3.6-slim
  • Linux container:python:3.7-slim
  • macOS PYTHON:3.6.8
  • macOS PYTHON:3.7.2
  • Windows container:python:3.6-windowsservercore-1809
  • Windows container:python:3.7-windowsservercore-1809

@bors bors bot merged commit edce34f into duckinator:master Jun 23, 2019
@nbraud nbraud deleted the pep-518 branch June 24, 2019 22:46
@duckinator duckinator mentioned this pull request Jun 16, 2020
bors bot added a commit that referenced this pull request Jun 16, 2020
136: Remove setup.py. r=duckinator a=duckinator

Replaces and closes #58.

Original description for #58:

> Followup on #55.
> 
> - [x] Get rid of `setup.py`, which was made optional by pypa/setuptools#1675.
> - [x] Set a version requirement for `setuptools`.

Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
Co-authored-by: Ellen Marie Dash <me@duckie.co>
bors bot added a commit that referenced this pull request Jun 16, 2020
136: Remove setup.py. r=duckinator a=duckinator

Replaces and closes #58.

Original description for #58:

> Followup on #55.
> 
> - [x] Get rid of `setup.py`, which was made optional by pypa/setuptools#1675.
> - [x] Set a version requirement for `setuptools`.

Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
Co-authored-by: Ellen Marie Dash <me@duckie.co>
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