Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

setup.py loads version information from VERSION #37

Merged
merged 1 commit into from
May 25, 2019

Commits on May 13, 2019

  1. setup.py loads version information from VERSION

    Previously, setup.py would import the version information from
    pinject.version. This would trigger pinject's __init__.py to import and
    load, which would take a roundabout path to importing the decorator
    dependency. The setup.py script is launched by pip while inspecting the
    package and dependencies, so this problem will come up in a package
    sourcing pinject as a dependency even if decorator is declared as a
    dependency in that package.
    
    Referencing:
    https://packaging.python.org/guides/single-sourcing-package-version/#single-sourcing-the-version
    
    The previous method was similar to number 6 (setting the value of
    __version__ and then importing it). It was changed to number 4 (placing
    the version in a VERSION file that is read from disk).
    
    Given there is a parent VERSION file that is connected to the Makefile,
    this file is now sourced by setup.py. To ensure it is available when
    installing pinject, the VERSION file was also added to the manifest. The
    existing version.py convention is kept for regular use by pinject since
    that file is readily available to the package when running its source
    normally.
    
    This should fix issue google#35.
    rockobonaparte committed May 13, 2019
    Configuration menu
    Copy the full SHA
    9a6e410 View commit details
    Browse the repository at this point in the history