Comments (17)
It gets generated by setuptools_scm
:
scikit-hep-testdata/pyproject.toml
Lines 10 to 11 in 695d047
When you run pip install .
, it makes this file as part of the build process.
from scikit-hep-testdata.
Actually, this is on purpose. Installing it "the right way" (with pip) inserts a version.py, either a tag or a dev version.
from scikit-hep-testdata.
It's not filled when installing it with setup.py. Perhaps that can be considered as a bug?
from scikit-hep-testdata.
This is something I had to get used to, too. python setup.py install
is not considered a valid way to install a Python package (anymore). It has to be pip install .
or pip install -e .
(for development: editing files in the base repo would then affect the installed version).
Maybe we need a statement on the front page saying this because even though it's a general rule now (for all Python projects), I wouldn't have known about it if @henryiii hadn't told me.
from scikit-hep-testdata.
I'm not sure this is about whether setuptools is being called from setup.py
vs from pip install
. My assumption was that it might work via pip install
because the version.py exists on the developer's machine and is then rolled into the published wheel.
from scikit-hep-testdata.
In that case, would it be okay to add use_scm_version=True, setup_requires=['setuptools_scm']
to the setup()
call in setup.py
.
https://pypi.org/project/setuptools-scm/#setup-py-usage
from scikit-hep-testdata.
Why? The current version works fine, does it not? If something is broken, that should be fixed instead of using old setup.py usages?
from scikit-hep-testdata.
Using setup.py install
is my use case that is broken.
from scikit-hep-testdata.
Did you install setuptools_scm[toml]
? If you do, it should work. But please don't use setup.py <anything>
, that's an implementation detail of setuptools and setup.py is not even required anymore.
from scikit-hep-testdata.
If you want packages to be pre-installed for you, use pip
, do not depend on setup_requires
, which is an abomination and has been replaced by PEP 517/518 builds.
Note that the current SDist is very much broken, working on that.
from scikit-hep-testdata.
Did you install
setuptools_scm[toml]
? If you do, it should work. But please don't usesetup.py <anything>
, that's an implementation detail of setuptools and setup.py is not even required anymore.
I did not have setuptools_scm
available during the build and it silently produced installation that would crash on import with
ModuleNotFoundError: No module named 'skhep_testdata.version'
Adding the setuptools_scm
, indeed, fixes the issue. Thank you!
from scikit-hep-testdata.
Once the new SDist is out in 0.4.3, you can build from that and it does have version.py in it so setuptools_scm won't be needed when installing from SDist if you don't want it. Soon, setuptools_scm may gain support for git tarballs too, so the version file could even be included in git tarball downloads. So it's only a git checkout that requires setuptools_scm
, and only if you don't use python -m pip install .
or python -m build
, and so don't get a PEP 517 build process.
from scikit-hep-testdata.
Close if you are happy. :)
from scikit-hep-testdata.
If you want packages to be pre-installed for you, use
pip
, do not depend onsetup_requires
, which is an abomination and has been replaced by PEP 517/518 builds.
I got bit while trying to package this NixOS/nixpkgs#124557. The usual method of stumbling upon dependencies as they are asked for didn't work ;)
from scikit-hep-testdata.
Close if you are happy. :)
Very much so! Looking forward to using fixed SDist's :)
from scikit-hep-testdata.
I have added
import setuptools_scm # noqa
before to make it a bit more obvious as to why this fails when it's missing - but if you get it from SDist, you don't actually need setuptools_scm, so it's kind of a 50/50 proposition.
from scikit-hep-testdata.
Probably should see if the version file exists, then try to import setuptools_scm, that would provide the best error messages. But this use case is really quite rare, I think, it's almost always distribution packaging that does this, and there are a limited number of distributions packaging Python packages.
from scikit-hep-testdata.
Related Issues (20)
- Replace coveralls with codecov
- Increase the pre-commit auto-update frequency HOT 1
- Failure of scikit-hep-testdata when installed via `test_requires` in Travis HOT 34
- Seems like there are duplicate files HOT 2
- 0.4.39: pypi source tar ball does not include data HOT 1
- Only the latest data files are accessible HOT 3
- Include files from uproot's github pages HOT 10
- Are any test files accessible by (public) XRootD? HOT 5
- Tests fail on windows HOT 1
- YAML loader warning
- Investigate options for large file storage HOT 7
- New version? HOT 22
- Python 3.5 supported? HOT 8
- Error when building: setuptools-scm was unable to detect version HOT 10
- second LHE testfile with easy physics HOT 54
- Source tarball is missing setup.py, skhep_testdata directory, etc HOT 7
- First pip release HOT 4
- Views on adding test files that are not explicitly needed for Scikit-HEP testing HOT 9
- Revive uproots .C macros for producing faked data HOT 1
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 scikit-hep-testdata.