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

force_write_version_files added with different default in version 8 #919

Closed
henryiii opened this issue Sep 20, 2023 · 1 comment · Fixed by #924
Closed

force_write_version_files added with different default in version 8 #919

henryiii opened this issue Sep 20, 2023 · 1 comment · Fixed by #924

Comments

@henryiii
Copy link
Contributor

The parameter force_write_version_files was added to _get_version with a different default than in <8, which causes _get_version to no longer write out version files.

Seen in scikit-build/scikit-build-core#507

@indiVar0508
Copy link

Hi ,

I was also facing same issue, getting below mentioned log in my CI build

File "/tmp/pip-build-env-r_42x_uq/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
  ep.load()(self, ep.name, value)
File "/tmp/pip-build-env-r_42x_uq/normal/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
  _assign_version(dist, config)
File "/tmp/pip-build-env-r_42x_uq/normal/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
  maybe_version = _get_version(config, force_write_version_files=True)
File "/tmp/pip-build-env-r_42x_uq/normal/lib/python3.8/site-packages/setuptools_scm/_get_version_impl.py", line 94, in _get_version
  write_version_files(config, version=version_string, scm_version=parsed_version)
File "/tmp/pip-build-env-r_42x_uq/normal/lib/python3.8/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
  dump_version(
File "/tmp/pip-build-env-r_42x_uq/normal/lib/python3.8/site-packages/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
  assert not write_to.is_absolute(), f"{write_to=}"
AssertionError: write_to=PosixPath('/__w/folder_one/folder_one/apps/folder_two/folder_three/version.txt')
[end of output]

I think this assert is added from v8.0.0 which is causing issue not sure exactly i haven't gone older tag code as of now.
https://github.com/pypa/setuptools_scm/blob/main/src/setuptools_scm/_integration/dump_version.py#L38

RonnyPfannschmidt added a commit to RonnyPfannschmidt/setuptools_scm that referenced this issue Sep 21, 2023
RonnyPfannschmidt added a commit to RonnyPfannschmidt/setuptools_scm that referenced this issue Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants