Skip to content

Fix: try to get setuptools scm to work with src #9

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions example1b_build_setuptools_scm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
requires = ["setuptools>=61.0.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"


# LookupError: setuptools-scm was unable to detect version for

# To adopt the src/ layout you'll need the following section
# If you are using a flat layout you can likely remove this!
[tool.setuptools.packages.find]
where = ["src"]

# How do i specify the root correctly to help setuptools find the version?
# LookupError: setuptools-scm was unable to detect version for
# This is optional if you wish to use scm for versioning
[tool.setuptools_scm]
Copy link
Member Author

Choose a reason for hiding this comment

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

hey there @RonnyPfannschmidt ! i was wondering if you could help be debug this by chance? I'm trying to get setuptools_scm to find the version. i know this is a complex repo as we're using it as examples for the community. but i'm not sure how or where setuptools scm looks for version information if it's not just looking at git tags. many thanks for any direction. (and please say the word if you'd like me to submit an issue somewhere / it's is not appropriate to ask here)

Choose a reason for hiding this comment

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

Sorry for the delay, I'm preoccupied

The root option is needed when under use in a subdirectory, as otherwise a number of upstream packaging schemes break things

The root option sets the scm root relative to the pyproject.toml file

root = "../"
Expand Down