Comments (2)
Replacing
#!python
if not os.path.exists(os.path.join(root, '.git')):
return
with
#!python
from subprocess import call, STDOUT
import os
if call(["git", "status"], stderr=STDOUT, stdout=open(os.devnull, 'w')) != 0:
return
should be an appropriate fix.
Original comment by: Amit Ambasta
from setuptools_scm.
the intent is to quickly skip if one is not in a git related directory at all
if there is a .git folder but it invalid it will bail out as the revparse as intended
so unless there is something huge i have overseen the check works as intended right now
feel free to reopen with an direct example detailing why the check should be done as you lined out (its perfectly valid, but invokes a fork+exec instead of a stat which is what i wanted to avoid)
Original comment by: Ronny Pfannschmidt
from setuptools_scm.
Related Issues (20)
- Non-monotonic development versions with release branch scheme HOT 4
- wheel from sdist leads to nuisance error messages in backend HOT 5
- Documented `.git_archival.txt` is not reproducible HOT 1
- Incorrect documentation regarding docker cache HOT 2
- Don't use tag from repo for version HOT 18
- test_build_c_ext fails on Python 3.12 in Arch Linux HOT 1
- version 8 silently breaks version detection HOT 2
- latest version of git breaks setuptools_scm with python3.9 HOT 2
- `devX` tags get special treatment HOT 4
- 8.0.4: `ruff` warning
- UserWarning: tag 'v.xxx' no version found HOT 3
- 8.1.0: `test_dump_version_flake8` fails with `D100 Missing docstring in public module` HOT 1
- Python version limit HOT 5
- setuptools_scm looks for setup.cfg when python -m used for pip install HOT 2
- Cut a new release HOT 6
- Different hash (length) in generated name HOT 6
- final version as environment variable HOT 1
- Calculate distance in a git monorepo just for the current project's path HOT 7
- How to filter out `.gitignore` with `python -m build --sdist` HOT 4
- SETUPTOOLS_SCM_PRETEND_VERSION: parse node & distance HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setuptools_scm.