Comments (4)
for some of the packages I'm using in a real project can add 20-30 seconds to even full-poetry-cache-hit builds
Ah, that's true, the extra time is unfortunate.
I can't think of a good solution to this offhand, but if you do investigate further, I'd be interested to hear what you come up with!
from poetry-dynamic-versioning.
Hi! Thanks for the kind words :)
I think this is just a cosmetic issue in poetry install
, presumably because it reports the static version in pyproject.toml first before running the build code that updates the version. The right version will still be present in the venv managed by Poetry:
$ poetry install
Creating virtualenv fake-project in C:\tmp\issue154\.venv
Updating dependencies
Resolving dependencies... (1.2s)
Package operations: 1 install, 0 updates, 0 removals
• Installing dummy-python-project (0.0.999 d3a036f)
$ . .venv/Scripts/activate
$ pip list | grep dummy
dummy-python-project 0.1.0.post8.dev0+d3a036f
from poetry-dynamic-versioning.
@mtkennerly Holy cow what a fast reply!
I think this is just a cosmetic issue in poetry install, presumably because it reports the static version in pyproject.toml first before running the build code that updates the version. The right version will still be present in the venv managed by Poetry
You're absolutely correct in that ultimately the right version is exposed both by pip
(from your example) and programmatically:
$ poetry run python -c 'import pkg_resources; print(pkg_resources.get_distribution("dummy-python-project").version)'
0.1.0.post8.dev0+d3a036f
The issue is that subsequent poetry install
calls think it's a version change, and will "downgrade" (i.e. - reinstall) the package (which isn't the end of the world, but for some of the packages I'm using in a real project can add 20-30 seconds to even full-poetry-cache-hit builds):
$ poetry install -vvv
Using virtualenv: /Users/rusnyder/Library/Caches/pypoetry-arm64/virtualenvs/fake-project-GaTXRtqa-py3.8
Installing dependencies from lock file
Finding the necessary packages for the current system
Package operations: 0 installs, 1 update, 0 removals
• Downgrading dummy-python-project (0.1.0.post8.dev0+d3a036f d3a036f -> 0.0.999 d3a036f): Pending...
• Downgrading dummy-python-project (0.1.0.post8.dev0+d3a036f d3a036f -> 0.0.999 d3a036f): Installing...
• Downgrading dummy-python-project (0.1.0.post8.dev0+d3a036f d3a036f -> 0.0.999 d3a036f)
Ideally subsequent poetry install
calls would recognize the dynamic version of the installed package and not reinstall it.
I don't imagine this is an issue with this plugin, rather with poetry itself, so if you don't have any intuition around what might be happening I can do a little digging, just figured I'd check here first!
from poetry-dynamic-versioning.
Sounds good! I'll go ahead and close this for now, and circle back with either an "AHA!" or "Bummer..." when I get back around to digging in.
Thanks for taking a look!
from poetry-dynamic-versioning.
Related Issues (20)
- Create a file with the version in it without any "replacement magic" HOT 3
- Keep the apostrophe/quotation marks in pyproject version replacement HOT 2
- Version not substituted for chained package dependencies HOT 2
- SETUPTOOLS_SCM_PRETEND_VERSION vs POETRY_DYNAMIC_VERSIONING_BYPASS HOT 2
- Got an error with 'poetry update' HOT 3
- Whl files generated by poetry build do not contain the static version files specific in substitiution HOT 4
- Check file existance for `[tool.poetry-dynamic-versioning.substitution]` HOT 3
- `poetry install` with editable deps using dynamic versions always reports a downgrade. HOT 1
- Getting PermissionError when using poetry-dynamic-versioning in GitHub CI HOT 3
- poetry publish can't find files built with with dynamic versioning HOT 1
- `AssertionError: would build wheel with unsupported tag ('cp312', 'cp311', 'macosx_11_0_arm64')` HOT 2
- Plugin breaks poetry 1.8.0 HOT 2
- Push to PyPI, even in dirty mode HOT 2
- __version__.py file not included in build HOT 3
- poetry-dynamic-versioning fails to retrieve version with poetry 1.8.1 and 1.8.2 HOT 2
- What would you need to stop monkeypatching `poetry.core`? HOT 2
- Plugin installation crashes HOT 2
- Feature request: optional tag prefix for monorepo support HOT 3
- A duplication of the name field is required in pyproject.toml when using poetry-dynamic-versioning with poetry_pep621 HOT 1
- tool.poetry.version field is not updated HOT 4
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 poetry-dynamic-versioning.