Giter Club home page Giter Club logo

Comments (5)

abergeron avatar abergeron commented on May 31, 2024

I've also encountered this problem and would like to solve it.

I don't think that having poetry as a dependencies is a bad idea to use the version parsing code. poetry discourages installing poetry directly if it is the command you will use to manage other packages. Unless you recommend that people do poetry run poetry ... in the project dir, it should be fine.

The alternative would be to re-implement the version parsing code which shouldn't be too hard but can introduce a lot of code (probably in a secondary file).

I'm fine with either approach, do you have a preference?

from poetry2conda.

dojeda avatar dojeda commented on May 31, 2024

I prefer not to re-implement version parsing code because there are a lot of caveats in it. For example, the caret of versions prior to 1.0 is different than after that first stable version.

I skimmed a bit of the new poetry organization, and it seems that it would be very lightweight to use poetry-core as a dependency and use their version parsing:

https://github.com/python-poetry/core/tree/master/poetry/core/semver

from poetry2conda.

abergeron avatar abergeron commented on May 31, 2024

All right, I'll go with that.

from poetry2conda.

abergeron avatar abergeron commented on May 31, 2024

I've got it mostly working (using poetry-semver, because it's smaller), but there is still a bug in the version parsing of poetry where it will ignore the end of a version spec sometimes.

The version string that triggers it for me is '0.7.1dev1+1.*' where it ignores the '.*' part.

I've submitted a PR with a fix: python-poetry/semver#3, but it doesn't work with python 2.7 and I'm not sure how to make it work.

I've checked and poetry-core and poetry itself also have the same problem so switching is not a solution (otherwise I would have).

from poetry2conda.

dojeda avatar dojeda commented on May 31, 2024

OK thanks again for your contributions.
I am going to accept the PR #6 since it is certainly better than the first, previous version.

I am not too worried about something that does not work with Python 2.7. Do you still have legacy projects?

from poetry2conda.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.