8000 "pip wheel" gets null version string from submodule · Issue #121 · python-versioneer/python-versioneer · GitHub
[go: up one dir, main page]

Skip to content
"pip wheel" gets null version string from submodule #121
@matthew-brett

Description

@matthew-brett

This must be a variant of #38 .

In this case it affects projects with the standard directory structure, where .git and setup.py are in the same directory - but where the package directory is a submodule of another repository.

When building wheels for various projects, I often have the wheel-building machinery in a repository, and the project I am building as a sub-module (e.g. matplotlib-wheels and many others). For pip wheel . in the submodule, the version string is incorrect:

$ mkdir mod  # Make an empty superproject
$ cd mod
$ git init
$ # Add some submodule using (latest master) versioneer
$ git submodule add https://github.com/matthew-brett/transforms3d.git
$ # Make wheel with `pip wheel`
$ cd transforms3d/
$ pip wheel .
$ # Version string is incorrect
$ ls *.whl
transforms3d-0+unknown-py2-none-any.whl

It is correct for python setup.py bdist_wheel:

$ python setup.py bdist_wheel
$ ls dist
transforms3d-0.2.1+5.g7631d2a-py2-none-any.whl

See matplotlib/matplotlib#6605 for the original report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0