Skip to content

Enforce version number at build time. #2302

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
merged 1 commit into from
Mar 17, 2017
Merged

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Mar 17, 2017

Prevent making releases with wrong version number that will confuse pip,
or make sdists to appear more recent than wheels.

cc @gnestor

Prevent making releases with wrong version number that will confuse pip,
or make sdists to appear more recent than wheels.
@Carreau Carreau added this to the 5.0 milestone Mar 17, 2017
@gnestor
Copy link
Contributor

gnestor commented Mar 17, 2017

Thanks @Carreau! This is very helpful.

@gnestor
Copy link
Contributor

gnestor commented Mar 17, 2017

It works!

grant:notebook grant$ python setup.py sdist
Traceback (most recent call last):
  File "setup.py", line 51, in <module>
    from setupbase import (
  File "/Users/grant/Sites/jupyter/notebook/setupbase.py", line 76, in <module>
    raise ValueError('Invalid version number `%s`, please follow pep440 convention or pip will get confused about which package is more recent.' % version)
ValueError: Invalid version number `5.0.0-rc.1`, please follow pep440 convention or pip will get confused about which package is more recent.

Do you think the error message should include a link to the version scheme? https://www.python.org/dev/peps/pep-0440/#version-scheme

@gnestor gnestor mentioned this pull request Mar 17, 2017
12 tasks
@gnestor gnestor merged commit 0087065 into jupyter:master Mar 17, 2017
@rgbkrk
Copy link
Member

rgbkrk commented Mar 17, 2017

😄

@minrk
Copy link
Member

minrk commented Mar 17, 2017

If we switch to always building with setuptools, this should also become unnecessary as it will do the check. I've started doing this in most new things, adding only the bdist_egg_disabled. I think we should stop supporting raw distutils install/sdist in general.

@blink1073
Copy link
Contributor

Cough, cough: https://github.com/jupyter/jupyter-packaging

@Carreau Carreau deleted the pep440 branch March 17, 2017 17:53
@Carreau
Copy link
Member Author

Carreau commented Mar 17, 2017

😄

We know you are a semver guy :-)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants