diff options
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -5,9 +5,8 @@ from setuptools.command.sdist import sdist as _sdist import fnmatch import os import sys -from os import path -with open(path.join(path.dirname(__file__), 'VERSION')) as v: +with open(os.path.join(os.path.dirname(__file__), 'VERSION')) as v: VERSION = v.readline().strip() with open('requirements.txt') as reqs_file: @@ -22,8 +21,8 @@ with open('README.md') as rm_file: class build_py(_build_py): def run(self) -> None: - init = path.join(self.build_lib, 'git', '__init__.py') - if path.exists(init): + init = os.path.join(self.build_lib, 'git', '__init__.py') + if os.path.exists(init): os.unlink(init) _build_py.run(self) _stamp_version(init) @@ -34,10 +33,10 @@ class sdist(_sdist): def make_release_tree(self, base_dir: str, files: Sequence) -> None: _sdist.make_release_tree(self, base_dir, files) - orig = path.join('git', '__init__.py') - assert path.exists(orig), orig - dest = path.join(base_dir, orig) - if hasattr(os, 'link') and path.exists(dest): + orig = os.path.join('git', '__init__.py') + assert os.path.exists(orig), orig + dest = os.path.join(base_dir, orig) + if hasattr(os, 'link') and os.path.exists(dest): os.unlink(dest) self.copy_file(orig, dest) _stamp_version(dest) |