jbweston / miniver

Like Versioneer, but smaller
Creative Commons Zero v1.0 Universal
53 stars 10 forks source link

top-level directory of the current Git repository is not the same error #15

Closed basnijholt closed 4 years ago

basnijholt commented 5 years ago

In the hpc05 package I use a root/src/hpc05 structure.

Here this check:

    if not os.path.samefile(p.communicate()[0].decode().rstrip("\n"), distr_root):      # if not os.path.samefile(p.communicate()[0].decode().rstrip("\n"), distr_root):
        # The top-level directory of the current Git repository is not the same     #     # The top-level directory of the current Git repository is not the same
        # as the root directory of the distribution: do not extract the     #     # as the root directory of the distribution: do not extract the
        # version from Git.     #     # version from Git.
        return  

fails and results in a unknown version. If I comment this out like in https://github.com/basnijholt/hpc05/commit/d27b432ee8bf8a670bd64f36ae785503872d9d52 then the correct version is displayed.

jbweston commented 4 years ago

Thanks for the report. Sorry it took so long to look at this; I've opened #18 and I'll look at this this weekend