Giter Site home page Giter Site logo

Comments (5)

seeker89 avatar seeker89 commented on May 29, 2024 1

Good point. We should do that. 👍

from powerfulseal.

dgzlopes avatar dgzlopes commented on May 29, 2024

Hey! Have been researching this one for a while. Following the fifth option here [0] we might use it for taking the version value in setup.py (and keep it as the single source of truth for the version number), and have the project code use the pkg_resources API for reading the version value. As an example:

import pkg_resources

try:
    __version__ = pkg_resources.get_distribution('powerfulseal').version
except Exception:
    __version__ = 'unknown'

This is actually how the setuptools [1] contributors manage their own version! [2].

[0] https://packaging.python.org/guides/single-sourcing-package-version/
[1] https://github.com/pypa/setuptools
[2] https://github.com/pypa/setuptools/blob/master/setuptools/version.py

from powerfulseal.

seeker89 avatar seeker89 commented on May 29, 2024

I think that's a pretty neat solution to this problem. Would you like to contribute a PR with that change ?

from powerfulseal.

dgzlopes avatar dgzlopes commented on May 29, 2024

Sure! Working on it right now.

from powerfulseal.

mikeln avatar mikeln commented on May 29, 2024

I think we can close this one.

from powerfulseal.

Related Issues (20)

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.