8000 MAINT: Remove versioneer by stefanv · Pull Request #24196 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Remove versioneer #24196

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 30 commits into from
Aug 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3577579
Remove versioneer
stefanv Jul 16, 2023
28d3c16
Store git version to disk
stefanv Jul 17, 2023
1592713
Fix version imports
stefanv Jul 17, 2023
f9f4230
Satisfy linter
stefanv Jul 17, 2023
bee36bb
Fix version regex; remove check for removed np.version
stefanv Aug 3, 2023
4550ead
Read version from pyproject.toml
stefanv Aug 8, 2023
0711d75
Update gitignore
stefanv Aug 8, 2023
2afee19
Satisfy linter
stefanv Aug 8, 2023
6b1dc56
Handle missing .git directory
stefanv Aug 8, 2023
2b181ef
Update setuppy pyproject.toml variant
stefanv Aug 8, 2023
f44045d
doc: grab git version using git, not versioneer
stefanv Aug 8, 2023
fbb0254
Remove versioneer from linter exclude
stefanv Aug 8, 2023
79553c8
Fix base version number, should be `.dev0` (with a dot) to be valid
rgommers Aug 9, 2023
27b4c51
Fix and restore tests in `test_numpy_version.py`
rgommers Aug 9, 2023
6a6d63a
Fix CircleCI doc build error due to git hash
rgommers Aug 9, 2023
1fedea3
Always re-generate version.py during the build
stefanv Aug 9, 2023
7d1fc7f
No need to write version in meson config
stefanv Aug 10, 2023
75132ee
git hash is optional in, e.g., sdist build
stefanv Aug 10, 2023
3a9aec1
Always use 7 characters for shortened git hash
stefanv Aug 10, 2023
e0a3f86
Generate version.py as part of sdist
stefanv Aug 10, 2023
f827e86
Make gitversion aware of meson
stefanv Aug 10, 2023
ac1b69a
Run successfully on non-dev builds also
stefanv Aug 10, 2023
e36ab98
Version is not printed on cmd line when writing to file
stefanv Aug 10, 2023
12ed9f0
Calculate git version also for non-dev versions
stefanv Aug 11, 2023
5695abf
Do not generate version.py if it already exists in source tree
stefanv Aug 11, 2023
9ee4da9
Install version.py only when pre-built (build from sdist)
stefanv Aug 11, 2023
4abc3c7
Fix git version query
stefanv Aug 11, 2023
8287648
Merge branch 'main' into rm-versioneer
rgommers Aug 11, 2023
4b81f94
BUG: fix `python setup.py sdist` and the multiarray import error msg
rgommers Aug 11, 2023
6aff0bc
MAINT: revert change to setup.py for sdist/wheel versioning
rgommers Aug 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
MAINT: revert change to setup.py for sdist/wheel versioning
[skip azp] [skip cirrus] [skip circle] [skip travis]
  • Loading branch information
rgommers committed Aug 11, 2023
commit 6aff0bc423523b01bfff1ef30e89d40c0cb886a8
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def setup_package():
classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
test_suite='pytest',
version=FULLVERSION,
version=VERSION,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change, because VERSION is defined as

VERSION = '{}.{}.{}'.format(MAJOR, MINOR, MICRO)

and versioneer.get_version() returns the version including git hash. And it results in:

$ python setup.py sdist
numpy-2.0.2.0.0.dev0+git20230811.8287648.tar.gz

easy enough to fix it looks like, by using FULLVERSION instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, that didn't do it:

ERROR: Could not find a version that satisfies the requirement numpy (from versions: 2.0.0.dev0-git20230811.6c254b42.0.0.dev0-git20230811.6c254b4)

I'll do some more testing locally. I really want to merge this PR, but this seems like a blocker. Shouldn't be too difficult to fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, locally I get sdist and wheel that are named sensibly:

numpy-2.0.0.dev0+807.gf015fe226-cp39-cp39-linux_x86_64.whl

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, whatever, CI was green so I'm reverting to what it was. I really do get numpy-2.0.2.0.0.dev0+git20230811.6aff0bc locally, no idea what is going on there. But we're switching all jobs away from setup.py asap, so maybe it doesn't matter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been building wheels using python -m build --sdist. Is it necessary to support another pathway?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think that's a known issue indeed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another line in setup.py that doesn't seem quite right:

def get_docs_url():
    if 'dev' in VERSION:
        return "https://numpy.org/devdocs"

Another reason I think that your FULLVERSION patch is correct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah well, let's leave that for a follow-up. I'm kinda running out of steam and have some non open source plans for the weekend.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use_wheel job is happy to install this wheel, I guess it's a valid version number:

+ pip install --pre --no-index --upgrade --find-links=. numpy
Looking in links: .
Processing ./numpy-2.0.2.0.0.dev0+git20230811.f30bdab-cp39-cp39-linux_x86_64.whl
Installing collected packages: numpy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.0.2.0.0 🤪

cmdclass=cmdclass,
python_requires='>=3.9',
zip_safe=False,
Expand Down
0