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",
15 # Copy .py files and build, as usual
18 for data_file
in self
.package_data_files
:
19 outfile
= os
.path
.join(self
.build_lib
, data_file
)
20 self
.copy_file(data_file
, outfile
, preserve_mode
=0)
21 executable
= (os
.stat(data_file
).st_mode
& 0111) != 0
23 os
.chmod(outfile
, os
.stat(outfile
).st_mode |
0111)
25 class install_lib_exec(install_lib
):
28 if os
.name
!= 'posix': return
30 launch
= os
.path
.join(self
.install_dir
, 'zeroinstall/0launch-gui/0launch-gui')
31 os
.chmod(launch
, os
.stat(launch
).st_mode |
0111)
33 setup(name
="zeroinstall-injector",
34 version
=zeroinstall
.version
,
35 description
="The Zero Install Injector (0launch)",
36 author
="Thomas Leonard",
37 author_email
="zero-install-devel@lists.sourceforge.net",
38 url
="http://0install.net",
39 scripts
=['0launch', '0alias', '0store'],
40 data_files
= [('man/man1', ['0launch.1', '0alias.1', '0store.1']),
41 ('share/applications', ['applications/zeroinstall-zero2desktop.desktop']),
42 ('share/pixmaps', ['applications/zeroinstall-zero2desktop.png'])],
45 'build_py': build_with_data
,
46 'install_lib': install_lib_exec
,
49 A running process is created by combining many different libraries (and other
50 components). In the Zero Install world, we have all versions of each library
51 available at all times. The problem then is how to choose which versions to
54 The injector solves this problem by selecting components to meet a program's
55 requirements, according to a policy you give it. The injector finds out which
56 versions are available, and downloads and runs the ones you choose.""",
57 packages
=["zeroinstall", "zeroinstall.zerostore", "zeroinstall.injector", "zeroinstall.0launch-gui"])