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

setuptools_scm 8.0.x breaks pybuilder plugin pybuilder-scm-ver-plugin #930

Closed
chylek opened this issue Sep 22, 2023 · 6 comments · Fixed by #934
Closed

setuptools_scm 8.0.x breaks pybuilder plugin pybuilder-scm-ver-plugin #930

chylek opened this issue Sep 22, 2023 · 6 comments · Fixed by #934

Comments

@chylek
Copy link

chylek commented Sep 22, 2023

Hi. The pybuilder plugin pybuilder-scm-ver-plugin uses your package only to obtain the current version from SCM during the creation of a package. There is no need to include it in pyproject.toml (or in any other way) as the version is hard-coded after the pybuilder is done with its build and setuptools_scm is not longer needed.

Can you make the check optional? At least when calling setuptools_scm.get_version directly.

@RonnyPfannschmidt
Copy link
Contributor

please provide some context

@RonnyPfannschmidt
Copy link
Contributor

for context - when using get_version, no pyproject data is read

@chylek
Copy link
Author

chylek commented Sep 22, 2023

oh, apologies, I have misinterpreted the log output. There were two "errors" regarding setuptools_scm:

2023-09-21T15:10:18.112131+00:00	INFO	Step #2 - "build_package": /usr/local/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning: 
2023-09-21T15:10:18.112144+00:00	INFO	Step #2 - "build_package": ERROR: setuptools==58.1.0 is used in combination with setuptools_scm>=8.x
2023-09-21T15:10:18.112146+00:00	INFO	Step #2 - "build_package": 
2023-09-21T15:10:18.112147+00:00	INFO	Step #2 - "build_package": Your build configuration is incomplete and previously worked by accident!
2023-09-21T15:10:18.112148+00:00	INFO	Step #2 - "build_package": setuptools_scm requires setuptools>=61
2023-09-21T15:10:18.112148+00:00	INFO	Step #2 - "build_package": 
2023-09-21T15:10:18.112149+00:00	INFO	Step #2 - "build_package": Suggested workaround if applicable:
2023-09-21T15:10:18.112150+00:00	INFO	Step #2 - "build_package":  - migrating from the deprecated setup_requires mechanism to pep517/518
2023-09-21T15:10:18.112151+00:00	INFO	Step #2 - "build_package":    and using a pyproject.toml to declare build dependencies
2023-09-21T15:10:18.112151+00:00	INFO	Step #2 - "build_package":    which are reliably pre-installed before running the build tools

And

2023-09-21T15:10:34.625340+00:00	INFO	Step #2 - "build_package": BUILD FAILED - AttributeError: module 'setuptools_scm' has no attribute 'DEFAULT_VERSION_SCHEME' (site-packages/pybuilder_scm_ver_plugin/__init__.py:14)

The failure was due to the second error. You have removed DEFAULT_VERSION_SCHEME and DEFAULT_LOCAL_SCHEME from public.

The plugin was used to using it:

version_scheme = project.get_property("scm_ver_version_scheme", setuptools_scm.DEFAULT_VERSION_SCHEME)
local_scheme = project.get_property("scm_ver_local_scheme", setuptools_scm.DEFAULT_LOCAL_SCHEME)

@RonnyPfannschmidt
Copy link
Contributor

i can expose those attributes a while longer, but they will eventually be removed

i strongly recommend leaving the key out empty if no default was given

@chylek
Copy link
Author

chylek commented Sep 22, 2023

thanks, it would be nice to have them for a little longer. It will give us time to create PR with changes to the plugin.

@chylek chylek changed the title setuptools_scm 0.8.x breaks pybuilder plugin pybuilder-scm-ver-plugin setuptools_scm 8.0.x breaks pybuilder plugin pybuilder-scm-ver-plugin Sep 22, 2023
RonnyPfannschmidt added a commit to RonnyPfannschmidt/setuptools_scm that referenced this issue Sep 22, 2023
@RonnyPfannschmidt
Copy link
Contributor

For now they stay until the new api for building is ready and adopted

Once the api is available there will be warnings

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 a pull request may close this issue.

2 participants