fix requirements copy in mo setup.py (#9127)
This commit is contained in:
parent
11f0ec8f46
commit
2ff4ef2e4f
@ -10,10 +10,10 @@ $ python setup.py sdist bdist_wheel
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import copyfile
|
from shutil import copyfile, copy
|
||||||
|
|
||||||
from setuptools import setup, find_namespace_packages
|
from setuptools import setup, find_namespace_packages
|
||||||
from setuptools.command.build_py import build_py
|
from setuptools.command.build_py import build_py
|
||||||
@ -56,12 +56,10 @@ with open('requirements.txt', 'rt') as req_file:
|
|||||||
class InstallCmd(install):
|
class InstallCmd(install):
|
||||||
def run(self):
|
def run(self):
|
||||||
install.run(self)
|
install.run(self)
|
||||||
# Create requirements.txt files for all the frameworks
|
# copy requirements.txt files for all the frameworks
|
||||||
for name in requirements_txt:
|
for name in requirements_txt:
|
||||||
path = os.path.join(self.install_purelib, prefix, name)
|
copy(name, os.path.join(self.install_purelib, prefix))
|
||||||
with open(path, 'wt') as common_reqs_file:
|
|
||||||
common_reqs_file.write('\n'.join(deps))
|
|
||||||
# Add version.txt if exists
|
|
||||||
version_txt = 'version.txt'
|
version_txt = 'version.txt'
|
||||||
if os.path.exists(version_txt):
|
if os.path.exists(version_txt):
|
||||||
copyfile(os.path.join(version_txt),
|
copyfile(os.path.join(version_txt),
|
||||||
|
Loading…
Reference in New Issue
Block a user