
# HG changeset patch # User Zach Welch zach@mandolincreekfarm.com # Fake Node ID 4072d4301c865abcded0a46d88716cc700aeac77
Adjust setup.py for relocated drivers (#2351)
This patch update setup.py to work with the moved drivers.
diff --git a/setup.py b/setup.py index b923670..b9048e5 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import sys import os
from chirp import CHIRP_VERSION -from chirp import * +from chirp.drivers import * import chirp
@@ -11,12 +11,20 @@ def staticify_chirp_module(): import chirp
with file("chirp/__init__.py", "w") as init: - print >>init, "CHIRP_VERSION = "%s"" % CHIRP_VERSION print >>init, "__all__ = %s\n" % str(chirp.__all__)
print "Set chirp/__init__.py::__all__ = %s" % str(chirp.__all__)
+def staticify_drivers_module(): + import chirp + + with file("chirp/drivers/__init__.py", "w") as init: + print >>init, "__all__ = %s\n" % str(chirp.__all__) + + print "Set chirp/drivers/__init__.py::__all__ = %s" % str(chirp.__all__) + + def win32_build(): from distutils.core import setup import py2exe @@ -37,6 +45,7 @@ def win32_build(): pass
staticify_chirp_module() + staticify_drivers_module()
opts = { "py2exe": { @@ -52,7 +61,7 @@ def win32_build(): }
mods = [] - for mod in chirp.__all__: + for mod in chirp.__all__, chirp.drivers.__all__: mods.append("chirp.%s" % mod) opts["py2exe"]["includes"] += ("," + ",".join(mods))
@@ -110,7 +119,7 @@ def default_build():
setup( name="chirp", - packages=["chirp", "chirpui"], + packages=["chirp", "chirp.drivers", "chirpui"], version=CHIRP_VERSION, scripts=["chirpw"], data_files=[('share/applications', desktop_files),