mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
fix dvc[all] (#6657)
* fix dvc[all] - related https://github.com/iterative/dvc-snap/issues/24 * fix pylint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import importlib.util
|
||||
import os
|
||||
from pathlib import Path
|
||||
from textwrap import dedent
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools.command.build_py import build_py as _build_py
|
||||
@@ -35,11 +36,16 @@ version = dvc_version.__version__ # noqa: F821
|
||||
# - https://github.com/python/mypy
|
||||
class build_py(_build_py):
|
||||
def pin_version(self):
|
||||
path = os.path.join(self.build_lib, "dvc")
|
||||
self.mkpath(path)
|
||||
with open(os.path.join(path, "version.py"), "w") as fobj:
|
||||
fobj.write("# AUTOGENERATED at build time by setup.py\n")
|
||||
fobj.write(f'__version__ = "{version}"\n')
|
||||
ver_file = Path(self.build_lib) / "dvc" / "version.py"
|
||||
self.mkpath(os.fspath(ver_file.parent))
|
||||
ver_file.write_text(
|
||||
dedent(
|
||||
f"""\
|
||||
# AUTOGENERATED at build time by setup.py
|
||||
__version__ = "{version}"
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
def run(self):
|
||||
self.execute(self.pin_version, ())
|
||||
@@ -59,9 +65,10 @@ requirements = {
|
||||
|
||||
install_requires = requirements.pop("default")
|
||||
requirements["all"] = [
|
||||
requirements
|
||||
req
|
||||
for key, requirements in requirements.items()
|
||||
if key not in ("tests", "ssh_gssapi", "terraform")
|
||||
for req in requirements
|
||||
]
|
||||
requirements["tests"] += requirements["terraform"]
|
||||
requirements["dev"] = requirements["all"] + requirements["tests"]
|
||||
|
||||
Reference in New Issue
Block a user