mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 10:46:24 +00:00
setup: use execfile to access _auto_deps.py in its proper location of src/allmydata/ instead of copying it into place when setup.py is executed
This commit is contained in:
parent
e6a380241a
commit
0c6bb0178b
4
Makefile
4
Makefile
@ -243,10 +243,10 @@ test-darcs-boringfile:
|
||||
$(PYTHON) misc/build_helpers/test-darcs-boringfile.py
|
||||
|
||||
test-clean:
|
||||
find . |grep -vEe "_darcs|allfiles.tmp|src/allmydata/_(version|auto_deps|appname).py" |sort >allfiles.tmp.old
|
||||
find . |grep -vEe "_darcs|allfiles.tmp|src/allmydata/_(version|appname).py" |sort >allfiles.tmp.old
|
||||
$(MAKE)
|
||||
$(MAKE) clean
|
||||
find . |grep -vEe "_darcs|allfiles.tmp|src/allmydata/_(version|auto_deps|appname).py" |sort >allfiles.tmp.new
|
||||
find . |grep -vEe "_darcs|allfiles.tmp|src/allmydata/_(version|appname).py" |sort >allfiles.tmp.new
|
||||
diff allfiles.tmp.old allfiles.tmp.new
|
||||
|
||||
clean:
|
||||
|
14
setup.py
14
setup.py
@ -48,11 +48,6 @@ from setuptools import find_packages, setup
|
||||
from setuptools.command import sdist
|
||||
from setuptools import Command
|
||||
|
||||
# Make the dependency-version-requirement, which is used by the Makefile at
|
||||
# build-time, also available to the app at runtime:
|
||||
shutil.copyfile("_auto_deps.py",
|
||||
os.path.join("src", "allmydata", "_auto_deps.py"))
|
||||
|
||||
trove_classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Console",
|
||||
@ -224,8 +219,9 @@ class CheckAutoDeps(Command):
|
||||
def finalize_options(self):
|
||||
pass
|
||||
def run(self):
|
||||
import _auto_deps
|
||||
_auto_deps.require_auto_deps()
|
||||
adglobals = {}
|
||||
execfile('src/allmydata/_auto_deps.py', adglobals)
|
||||
adglobals['require_auto_deps']()
|
||||
|
||||
|
||||
class MakeExecutable(Command):
|
||||
@ -326,7 +322,9 @@ class MySdist(sdist.sdist):
|
||||
# Tahoe's dependencies are managed by the find_links= entry in setup.cfg and
|
||||
# the _auto_deps.install_requires list, which is used in the call to setup()
|
||||
# below.
|
||||
from _auto_deps import install_requires
|
||||
adglobals = {}
|
||||
execfile('src/allmydata/_auto_deps.py', adglobals)
|
||||
install_requires = adglobals['install_requires']
|
||||
|
||||
APPNAME='allmydata-tahoe'
|
||||
APPNAMEFILE = os.path.join('src', 'allmydata', '_appname.py')
|
||||
|
@ -1,3 +1,10 @@
|
||||
# Note: do not import any module from Tahoe-LAFS itself in this
|
||||
# file. Also please avoid importing modules from other packages than
|
||||
# the Python Standard Library if at all possible (exception: we rely
|
||||
# on importing pkg_resources, which is provided by setuptools,
|
||||
# zetuptoolz, distribute, and perhaps in the future distutils2, for
|
||||
# the require_auto_deps() function.)
|
||||
|
||||
install_requires=[
|
||||
# we require newer versions of setuptools (actually
|
||||
# zetuptoolz) to build, but can handle older versions to run
|
||||
@ -64,6 +71,7 @@ if sys.version_info < (2, 5):
|
||||
|
||||
if hasattr(sys, 'frozen'): # for py2exe
|
||||
install_requires=[]
|
||||
del sys # clean up namespace
|
||||
|
||||
def require_python_version():
|
||||
import sys, platform
|
Loading…
Reference in New Issue
Block a user