62 |
[Data_Files (base_dir = 'install_data', |
[Data_Files (base_dir = 'install_data', |
63 |
copy_to = 'share/gnue', |
copy_to = 'share/gnue', |
64 |
template = ['recursive-include images *.png', |
template = ['recursive-include images *.png', |
|
'recursive-include images *.xpm', |
|
|
'recursive-include images *.ico', |
|
65 |
'recursive-include images *.bmp'], |
'recursive-include images *.bmp'], |
66 |
preserve_path = 1), |
preserve_path = 1), |
67 |
Data_Files (base_dir = 'install_config', |
Data_Files (base_dir = 'install_config', |
75 |
strip_dirs = 1, |
strip_dirs = 1, |
76 |
preserve_path = 1), |
preserve_path = 1), |
77 |
Data_Files (base_dir = 'install_data', |
Data_Files (base_dir = 'install_data', |
78 |
|
copy_to = 'share/man/man1', |
79 |
|
template = ['recursive-include doc/man *.1'], |
80 |
|
preserve_path = 0), |
81 |
|
Data_Files (base_dir = 'install_data', |
82 |
copy_to = 'share/doc/gnue-common', |
copy_to = 'share/doc/gnue-common', |
83 |
template = ['recursive-include doc *', |
template = ['recursive-include doc *', |
84 |
'prune doc/CVS', |
'prune doc/CVS', |
85 |
'prune doc/technotes/CVS'], |
'prune doc/man', |
86 |
|
'prune doc/technotes'], |
87 |
strip_dirs = 1, # This is a number, not true/false |
strip_dirs = 1, # This is a number, not true/false |
88 |
preserve_path = 1)] |
preserve_path = 1)] |
89 |
|
|
119 |
import distutils.command.sdist |
import distutils.command.sdist |
120 |
import distutils.command.build |
import distutils.command.build |
121 |
import distutils.command.install |
import distutils.command.install |
|
import distutils.command.install_scripts |
|
122 |
from setupext import Data_Files, install_Data_Files |
from setupext import Data_Files, install_Data_Files |
123 |
|
|
124 |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
328 |
|
|
329 |
distutils.command.install.install.run (self) |
distutils.command.install.install.run (self) |
330 |
|
|
|
# ============================================================================= |
|
|
# install_scripts: Generate man pages after installing |
|
|
# ============================================================================= |
|
|
|
|
|
class install_scripts (distutils.command.install_scripts.install_scripts): |
|
|
|
|
|
def run (self): |
|
|
distutils.command.install_scripts.install_scripts.run (self) |
|
|
|
|
|
if os.name == "posix": |
|
|
instcmd = self.get_finalized_command ("install") |
|
|
man1dir = os.path.join (instcmd.install_data, "share", "man", "man1") |
|
|
if not os.path.isdir (man1dir): |
|
|
os.makedirs (man1dir) |
|
|
olddir = os.getcwd () |
|
|
os.chdir (man1dir) |
|
|
for script in self.get_outputs (): |
|
|
print "building man page for %s" % os.path.basename (script) |
|
|
os.system ("PYTHONPATH=" + instcmd.install_lib + " " + \ |
|
|
script + " --generate-man-page") |
|
|
os.chdir (olddir) |
|
|
|
|
331 |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
332 |
# Get all packages in a directory |
# Get all packages in a directory |
333 |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
387 |
cmdclass = {"sdist": sdist, |
cmdclass = {"sdist": sdist, |
388 |
"build": build, |
"build": build, |
389 |
"install": install, |
"install": install, |
|
"install_scripts": install_scripts, |
|
390 |
"install_data": install_Data_Files}) |
"install_data": install_Data_Files}) |
391 |
|
|
392 |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |