ITADN

Not Compatible with pip install

#21Opend-v-t 创建于 2024-04-09
D
d-v-tcommented
I installed with pip install git+https://github.com/johnson-c/ColRadPy.git#egg=colradpy. The following code seems to cause problems as I don't have git installed: #get the path of the hash so people can track versions, done this way incase the user #didn't pull with git but just zip tssssk tsssk tsssssk base_path = os.path.dirname(os.path.abspath(__file__)) base_path = base_path[0:len(base_path) - 9] git_dir = pathlib.Path(base_path) / '.git' with (git_dir / 'HEAD').open('r') as head: ref = head.readline().split(' ')[-1].strip() with (git_dir / ref).open('r') as git_hash: self.data['user']['git_hash'] = git_hash.readline().strip() Because colradpy is not explicitly dependent on git otherwise, this seems like bad practice?
2 条评论