-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
AttributeError: 'Version' object has no attribute 'release' after upgrade to 6.2.0 #612
Comments
@jaraco what the heck is up with that - i made setuptools_scm crash also version 6.2.0 was pulled for another mistake |
@djhoese the recommended way is to upgrade pip, setuptools and wheel before building a sdist, ideally one uses the build tool like we do in setuptools_scm/.github/workflows/python-tests.yml Lines 87 to 93 in 5b34935
|
What's sad about this is that I've learned about the |
im leaving this open until i understand why the heck we did manage to build a egg |
Or use # No setup-python or install dependencies step required
- name: Build package
run: pipx run build Also, never pass both |
@henryiii My project has a pyproject.toml, but the setuptools version specifier is based on whatever version was in the setuptools_scm instructions at the time of adding it. Not sure if that's what you are saying. If you're curious: https://github.com/vispy/vispy/blob/main/pyproject.toml |
Quick note: you should always specify Also, never put anything less than Good, then you don't need to specify setuptools and wheel, but you do need to use a builder that can build PEP 517 projects with PEP 518 dependencies. Just directly calling |
(But this should also be fixed, these are just general recommendations for the future) |
Ok so to clarify: if I use the |
If you use the build tool, you do not need to pre-install or update setuptools or wheel. Build, like pip, will make a temporary virtual environment, install exactly what you ask for (and only that) in the temporary virtual environment, and once it has an SDist or wheel, will remove the virtual environment. If you were using pip, it would do the same thing - You need wheel, setuptools, and setuptools_scm in your requires. You probably get setuptools from setuptools_scm, but don't count on it - always list the things you depend on, never trust transitive dependencies. I'm used to putting
|
I am having this issue as well because pip install of pdoc3 is still trying to use setuptools_scm version
|
Install it using the system package manager The next release will error out with a long message explaining the fixes |
@RonnyPfannschmidt thanks for the reply. Just to be clear, are you suggesting to install |
@ehashman that depends on your particular setup , depending on what it is, it may be a good idea to put build dependencies like pip/setuptools/setuptools_scm/wheel into layers using either pip or the system package manager ar first glance it looks like on your case a pip based install may be fine, but i also suggest to update pip+setuptools first |
@RonnyPfannschmidt Thanks again. I was able to get the correct non-yanked release installed and running without error using |
setuptools_scm 6.1 gives the error message: AttributeError: 'Version' object has no attribute 'release' See pypa/setuptools_scm#612
Related to #605 and #607.
I was just running a CI job to create wheels and sdist for the vispy project and it just picked up setuptools_scm 6.2.0 (released 16 minutes ago) and fails during sdist building. I noticed #607 says that modern setuptools should use pip. What is the recommended way to build an sdist package if not
python setup.py sdist
to avoid this error?The text was updated successfully, but these errors were encountered: