1 from distutils
.core
import setup
2 from distutils
.command
.build_py
import build_py
3 from distutils
.command
.install_lib
import install_lib
7 class build_with_data(build_py
):
8 """Python < 2.4 doesn't support package_data_files, so add it manually."""
10 "zeroinstall/0launch-gui/README",
11 "zeroinstall/0launch-gui/0launch-gui",
12 "zeroinstall/0launch-gui/ZeroInstall-GUI.xml",
13 "zeroinstall/0launch-gui/zero-install.glade",
16 # Copy .py files and build, as usual
19 for data_file
in self
.package_data_files
:
20 outfile
= os
.path
.join(self
.build_lib
, data_file
)
21 self
.copy_file(data_file
, outfile
, preserve_mode
=0)
22 executable
= (os
.stat(data_file
).st_mode
& 0111) != 0
24 os
.chmod(outfile
, os
.stat(outfile
).st_mode |
0111)
26 class install_lib_exec(install_lib
):
29 if os
.name
!= 'posix': return
31 launch
= os
.path
.join(self
.install_dir
, 'zeroinstall/0launch-gui/0launch-gui')
32 os
.chmod(launch
, os
.stat(launch
).st_mode |
0111)
34 setup(name
="zeroinstall-injector",
35 version
=zeroinstall
.version
,
36 description
="The Zero Install Injector (0launch)",
37 author
="Thomas Leonard",
38 author_email
="zero-install-devel@lists.sourceforge.net",
39 url
="http://0install.net",
40 scripts
=['0launch', '0alias', '0store', '0store-secure-add'],
41 data_files
= [('man/man1', ['0launch.1', '0alias.1', '0store-secure-add.1', '0store.1']),
42 ('share/applications', ['applications/zeroinstall-zero2desktop.desktop']),
43 ('share/pixmaps', ['applications/zeroinstall-zero2desktop.png'])],
46 'build_py': build_with_data
,
47 'install_lib': install_lib_exec
,
50 A running process is created by combining many different libraries (and other
51 components). In the Zero Install world, we have all versions of each library
52 available at all times. The problem then is how to choose which versions to
55 The injector solves this problem by selecting components to meet a program's
56 requirements, according to a policy you give it. The injector finds out which
57 versions are available, and downloads and runs the ones you choose.""",
58 packages
=["zeroinstall", "zeroinstall.support", "zeroinstall.zerostore", "zeroinstall.injector", "zeroinstall.0launch-gui"])