Comments (20)
Ah, so the version is there before the build, but it's not easy to get at because you can't just import dynd; dynd.__version__
?
from conda-build.
No, the version isn't there before the build, it gets constructed from a 'git describe' call during the build, and can be retrieved from the package at that point.
from conda-build.
I see. We should probably allow a similar thing for the build string.
How should we implement it? Maybe some flag that indicates to get the version from some environment variable, which is set in the build script.
from conda-build.
Having the build script set it in an environment variable would work well, sure.
from conda-build.
Thoughts how to do this @ilanschnell?
from conda-build.
If the build script sets an environment variable, how can we access it after the build script is finished?
from conda-build.
If that's not feasible, I guess a different approach is needed
from conda-build.
The build script write a special file, e.g. named __version_build__.txt
, into the source directory. If conda-build sees this file after the build script is executed, it adjusts the version and build number accordingly.
from conda-build.
Why not call it __version__.txt
? --- Alternatively the build script or meta.yaml file could specify the name of the file to look for.
Do you always have write access to the source directory? Perhaps we can look for this in the build directory instead?
from conda-build.
The source directory is where things get build usually. There is always write access to the source directory, for example when you extract a tarball, you need to be able to write files like config.log
, build/
, or even apply patches to the source.
from conda-build.
Actually, one needs the ability to extract the source tarball there in the first place.
from conda-build.
Good point, Aaron!
from conda-build.
What should be placed in the meta.yaml for the version in this case? Nothing? A special placeholder?
from conda-build.
I would argue that nothing extra is put into the meta.yaml file. There can even be a version in it, but as soon as the special file is found, it uses that.
from conda-build.
OK, that is simple enough.
from conda-build.
I disagree, I think a special tag should go in the meta.yaml, so that if a bug prevents the version file creation, an error is raised instead of silently producing a junk version.
from conda-build.
I just tested this new feature and can verify that it works as expected.
from conda-build.
I have also updated the docs.
from conda-build.
Just as a reference, __conda_version__.txt
is the name we decided on.
from conda-build.
Hi there, thank you for your contribution!
This issue has been automatically locked because it has not had recent activity after being closed.
Please open a new issue if needed.
Thanks!
from conda-build.
Related Issues (20)
- conda constructor never exits when "No space left on device" HOT 1
- FileNotFoundError: [WinError 2]
- Recipe rendering very slow in certain cases HOT 3
- conda-build not yet compatible with LIEF 0.14 API changes
- windows build failure trying to rename directory held by different process HOT 1
- Conda index CLI reference page maybe should be updated to reference separate conda-index tool HOT 1
- Conda mis-resolved the python version requirement the excluded the specified one HOT 1
- Remove `sys.exit` calls HOT 2
- noarch generic doesn't work as expected when python in host in multi-output HOT 1
- `PackagesNotFound` not converted to `DependencyNeedsBuildingError` HOT 1
- `"safe_dump()" has been removed` error using `conda skeleton pypi pod5` HOT 4
- Long `conda info` error messages for common exceptions HOT 1
- Regression: CondaMemoryError when building HOT 7
- Conda build is stuck with some unrelated build aterfacts. Unable to purge them.
- Limit logging config to CLI
- Deprecate `noarch_python_build_age` MetaData/Config setting
- the MSYS2 prefixes in the cran skeleton are fixed
- InvalidSpec error for spec ">=0.4,<0.4.4" in sktime HOT 8
- setup.py build documentation/implemantation for windows uses deprecated python setup.py install HOT 2
- Improve `cbc.yml` error reporting and validation
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 conda-build.