1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
--- setup.py 2004-05-12 05:13:55.000000000 -0300
+++ setup.new.py 2004-12-19 23:47:03.810170032 -0200
@@ -56,49 +56,6 @@
("/etc", ["pyxrc"])]
#
-# pyx_build_py
-#
-# pyx/siteconfig.py is not copied from the source directory,
-# but generated from the directory data obtained from install_data
-#
-
-class pyx_build_py(build_py):
-
- def run(self):
- # siteconfig depends on install_data:
- self.run_command('install_data')
- build_py.run(self)
-
- def build_module(self, module, module_file, package):
- if package == "pyx" and module == "siteconfig":
- # generate path information as the original build_module does it
- outfile = self.get_module_outfile(self.build_lib, [package], module)
- dir = os.path.dirname(outfile)
- self.mkpath(dir)
-
- # we do not copy pyx/siteconfig.py, but generate it
- # using the pyx_install_data instance
- install_data = self.distribution.command_obj["install_data"]
- f = open(outfile, "w")
- f.write("lfsdir = %r\n" % install_data.pyx_lfsdir)
- f.write("sharedir = %r\n" % install_data.pyx_sharedir)
- f.write("pyxrc = %r\n" % install_data.pyx_pyxrc)
- f.close()
- else:
- return build_py.build_module(self, module, module_file, package)
-
-#
-# install_data
-#
-
-class pyx_install_data(install_data):
-
- def run(self):
- install_data.run(self)
- self.pyx_lfsdir = self.pyx_sharedir = os.path.join(self.install_dir, "share", "pyx")
- self.pyx_pyxrc = os.path.join(self.root or "/", "etc", "pyxrc")
-
-#
# additional package metadata (only available in Python 2.3 and above)
#
@@ -135,6 +92,4 @@
packages=["pyx", "pyx/graph", "pyx/graph/axis", "pyx/t1strip", "pyx/pykpathsea"],
ext_modules=ext_modules,
data_files=data_files,
- cmdclass = {"build_py": pyx_build_py,
- "install_data": pyx_install_data},
**addargs)
--- pyx/siteconfig.py 2004-12-20 00:21:36.982999856 -0200
+++ siteconfig.new.py 2004-12-20 00:21:33.312557848 -0200
@@ -1,36 +1,5 @@
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
-#
-#
-# Copyright (C) 2004 Andr� Wobst <wobsta@users.sourceforge.net>
-#
-# This file is part of PyX (http://pyx.sourceforge.net/).
-#
-# PyX is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# PyX is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with PyX; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# This file configures PyX search paths relative to the current
-# position, e.g. for local usage. When installing PyX via distutils
-# the contents of this file is not copied to the PyX installation.
-# Instead the correct information about the paths from the installation
-# process are used.
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-import os
-
-lfsdir = os.path.join(os.path.dirname(__file__), "lfs")
-sharedir = os.path.join(os.path.dirname(__file__), "..", "contrib")
-pyxrc = os.path.join(os.path.dirname(__file__), "..", "pyxrc")
-
+lfsdir = "/usr/share/pyx"
+sharedir = "/usr/share/pyx"
+pyxrc = "/etc/pyxrc"
|