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

Remove versioneer / setuptools #57941

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Mar 20, 2024

trying to follow the lead set by numpy/numpy#24196

@lithomas1

dynamic = [
'version'
]
version = "3.0.0.dev0"
Copy link
Member

Choose a reason for hiding this comment

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

Does this get rid of the commit info in the version?

If so, I'd be -1 on this.
(It may be useful for downstream to pin to a previous pandas nightly)

Copy link
Member Author

Choose a reason for hiding this comment

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

No the scripts that generate the version.py file will append the git revision to the end of this

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this worked.

The filename shows up as 3.0.0.dev0 (at least on the sdist)

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe I misunderstood the question. If you run interactively you will see the version:

>>> import pandas as pd
+ /usr/local/bin/ninja
[1/1] Generating pandas/generate-version with a custom command
Saving version to pandas/_version.py
>>> pd.__version__
'3.0.0.dev0+git20240321.84fbbb0'

Is the sdist folder name important?

Copy link
Member

Choose a reason for hiding this comment

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

I think so yes - pinning versions is based on the version in the sdist/wheel filename IIRC.

If you try reverting this change, do we get the git commit in the filename again?

Copy link
Member Author

Choose a reason for hiding this comment

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

_build_version/gitversion.py:L16 expects this to be version = ... - if you revert it back to the 'dynamic' key that no longer works

Copy link
Member Author

Choose a reason for hiding this comment

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

I checked an sdist build with NumPy and they have the exact same behavior as here - is there a reason why we want to differ from them?

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this make it so that the nightlies all basically have the same version?

(IIRC, pip figures out the version of the package from the filename, and it's hardcoded to 3.0.0dev0 for both the wheels and the sdist)

Copy link
Member Author

Choose a reason for hiding this comment

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

Are we storing a longer term snapshot of the nightlies somewhere? On Anaconda I only see 5 days worth:

https://anaconda.org/scientific-python-nightly-wheels/pandas/files

NumPy only stores one day worth and no sdist:

https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/numpy/

@lithomas1 lithomas1 added the Build Library building on various platforms label Mar 21, 2024
@WillAyd WillAyd requested a review from mroeschke as a code owner March 21, 2024 02:48
@WillAyd WillAyd changed the title Remove versioneer Remove versioneer / setuptools Mar 21, 2024
@WillAyd WillAyd requested a review from noatamir as a code owner March 21, 2024 20:32
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Apr 22, 2024
@mroeschke
Copy link
Member

Closing since there hasn't been much activity here, but feel free to reopen if/when you have time to revisit

@mroeschke mroeschke closed this May 15, 2024
@WillAyd
Copy link
Member Author

WillAyd commented May 15, 2024

@lithomas1 we are dropping setuptools support for 3.0 right?

@lithomas1
Copy link
Member

I don't think the setuptools stuff is maintained anymore. (I just forgot to remove it)

I think my main objection was to the versioneer stuff.

@mroeschke mroeschke reopened this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants