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

pyproject.toml: setuptools_scm used incorrectly #303

Closed
Frosty2500 opened this issue Sep 23, 2024 · 1 comment · Fixed by #313
Closed

pyproject.toml: setuptools_scm used incorrectly #303

Frosty2500 opened this issue Sep 23, 2024 · 1 comment · Fixed by #313
Labels
bug Something isn't working

Comments

@Frosty2500
Copy link
Contributor

Currently our requirements for our built-system look like this, requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]. setuptools_scm is a tool that automatically sets our project version based on our version controll system (in our case Git). Currently the version is explicitly stated, version = "1.0.0", so setuptools_scm does nothing. @hadijannat can you take a look at this? I think we should either remove setuptools_scm and always manually change our project version in the pyproject.toml file or set it up correctly so that we only change the version per Git and it is copied automatically.

@hadijannat
Copy link
Contributor

hadijannat commented Sep 25, 2024

@frosty Thanks for bringing this up. I agree that we should adequately configure setuptools_scm to manage our project versioning automatically. Here's what we can do in a new pull request to implement Option 2 (Automated versioning):

  1. Keep setuptools_scm[toml]>=6.2 in the build-system requires (already done).
  2. Remove the explicit version from the project section.
  3. Add a tool.setuptools_scm section to configure version management.

Here's the proposed change to our pyproject.toml:

[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "basyx-python-sdk"

# The explicit version line has been removed from here

description = "The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 systems"
authors = [
    { name = "The Eclipse BaSyx Authors", email = "[email protected]" }
]
# ... (rest of the project section remains unchanged)

# Add this new section at the end of the file
[tool.setuptools_scm]
write_to = "basyx/_version.py"

´´´
What do you think :)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants