diff --git a/.gitignore b/.gitignore index 89d5005..57846ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -PyX-0.10.tar.gz -PyX-0.10-manual.pdf +PyX-0.11.1.tar.gz +manual.pdf diff --git a/PyX-0.8.1-siteconfig.patch b/PyX-0.8.1-siteconfig.patch deleted file mode 100644 index be8ba76..0000000 --- a/PyX-0.8.1-siteconfig.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -up PyX-0.10/setup.py.orig PyX-0.10/setup.py ---- PyX-0.10/setup.py.orig 2006-05-24 09:33:56.000000000 -0400 -+++ PyX-0.10/setup.py 2008-09-24 14:22:47.000000000 -0400 -@@ -15,8 +15,6 @@ except: - log = None - from distutils.core import setup, Extension - from distutils.util import change_root, convert_path --from distutils.command.build_py import build_py --from distutils.command.install_data import install_data - from distutils.command.install_lib import install_lib - import ConfigParser - import sys, os -@@ -81,79 +79,21 @@ adddatafiles("pyxrcdir", os.name != "nt" - # extend install commands to overwrite siteconfig.py during build and install - # - -- --class pyx_build_py(build_py): -- -- 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) -- outdir = os.path.dirname(outfile) -- self.mkpath(outdir) -- -- if log: -- log.info("creating proper %s" % outfile) -- -- # create the additional relative path parts to be inserted into the -- # os.path.join methods in the original siteconfig.py -- indir = os.path.dirname(module_file) -- addjoinstring = ", ".join(["'..'" for d in outdir.split(os.path.sep)] + -- ["'%s'" % d for d in indir.split(os.path.sep)]) -- -- # write a modifed version of siteconfig.py -- fin = open(module_file, "r") -- fout = open(outfile, "w") -- for line in fin.readlines(): -- fout.write(line.replace("os.path.join(os.path.dirname(__file__), ", -- "os.path.join(os.path.dirname(__file__), %s, " % addjoinstring)) -- fin.close() -- fout.close() -- else: -- return build_py.build_module(self, module, module_file, package) -- -- --class pyx_install_data(install_data): -- -- def run(self): -- self.siteconfiglines = [] -- for dir, files in self.data_files: -- # append siteconfiglines by " = " -- -- # get the install directory -- # (the following four lines are copied from within the install_data.run loop) -- dir = convert_path(dir) -- if not os.path.isabs(dir): -- dir = os.path.join(self.install_dir, dir) -- elif self.root: -- dir = change_root(self.root, dir) -- -- self.siteconfiglines.append("%s = '%s'\n" % (siteconfignames[files], dir)) -- -- install_data.run(self) -- -- - class pyx_install_lib(install_lib): - -- def run(self): -- # siteconfig.py depends on install_data: -- self.run_command('install_data') -- install_lib.run(self) -- - def install(self): -- # first we perform the tree_copy - result = install_lib.install(self) -- -- # siteconfiglines have been created by install_data -- siteconfiglines = self.distribution.command_obj["install_data"].siteconfiglines -- -- # such that we can easily overwrite siteconfig.py -+ root = self.get_finalized_command('install').root -+ if root == None: -+ root = '' -+ pyx_lfsdir = pyx_sharedir = os.path.join(sys.prefix, "share", "pyx") -+ pyx_pyxrc = os.path.join("/", "etc", "pyxrc") - outfile = os.path.join(self.install_dir, "pyx", "siteconfig.py") -- if log: -- log.info("creating proper %s" % outfile) - f = open(outfile, "w") -- f.writelines(siteconfiglines) -+ f.write("lfsdir = %r\n" % pyx_lfsdir) -+ f.write("sharedir = %r\n" % pyx_sharedir) -+ f.write("pyxrcdir = %r\n" % pyx_pyxrc) - f.close() -- - return result - - ################################################################################ -@@ -193,7 +133,5 @@ setup(name="PyX", - packages=["pyx", "pyx/graph", "pyx/graph/axis", "pyx/font", "pyx/pykpathsea"], - ext_modules=ext_modules, - data_files=data_files, -- cmdclass = {"build_py": pyx_build_py, -- "install_data": pyx_install_data, -- "install_lib": pyx_install_lib}, -+ cmdclass = {"install_lib": pyx_install_lib}, - **addargs) diff --git a/PyX.spec b/PyX.spec index 7a2bb49..31e7320 100644 --- a/PyX.spec +++ b/PyX.spec @@ -1,33 +1,23 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -# Necessary as soon as mkhowto is used -# at the moment that is not possible (#220693) -#%define pybasever %(%{__python} -c "from sys import version_info; print '%d.%d' % version_info[:2]") -#%define doc_tools_dir %{_libdir}/python%{pybasever}/Doc/tools - Name: PyX -Version: 0.10 -Release: 10%{?dist} +Version: 0.11.1 +Release: 1%{?dist} Summary: Python graphics package Group: Applications/Publishing License: GPLv2+ URL: http://pyx.sourceforge.net/ Source0: http://downloads.sourceforge.net/sourceforge/pyx/PyX-%{version}.tar.gz -Source1: %{name}-%{version}-manual.pdf - -# Fix the install root in the siteconfig.py -Patch0: PyX-0.8.1-siteconfig.patch +Source1: http://pyx.sourceforge.net/manual.pdf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: kpathsea-devel -BuildRequires: tetex-latex -# for mkhowto -#BuildRequires: python-tools +BuildRequires: tex(latex) -Requires: tetex +Requires: tex(latex) %description PyX is a Python package for the creation of PostScript and PDF files. It @@ -37,7 +27,6 @@ built out of these primitives. %prep %setup -q -%patch0 -p1 %build @@ -47,7 +36,7 @@ built out of these primitives. CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build # turn on ipc in config file -%{__sed} -i 's|^texipc =.*|texipc = 1|' pyxrc +%{__sed} -i 's|^texipc =.*|texipc = 1|' pyx/data/pyxrc # disable for now # pushd faq @@ -55,7 +44,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build # popd pushd manual -#ln -s %{doc_tools_dir}/mkhowto . +#ln -s /mkhowto . #make cp %{SOURCE1} ./manual.pdf popd @@ -64,6 +53,9 @@ popd rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} +%{__mkdir} %{buildroot}%{_sysconfdir} +%{__cp} -a pyx/data/pyxrc %{buildroot}%{_sysconfdir}/pyxrc + # Fix the non-exec with shellbang rpmlint errors for file in `find %{buildroot}%{python_sitearch}/pyx -type f -name "*.py"`; do [ ! -x ${file} ] && %{__sed} -i 's|^#!|##|' ${file} @@ -78,15 +70,15 @@ rm -rf %{buildroot} %doc AUTHORS CHANGES LICENSE PKG-INFO README manual/manual.pdf %doc contrib/ examples/ %config(noreplace) %{_sysconfdir}/pyxrc -%{_datadir}/pyx/ +%{python_sitearch}/%{name}*egg-info %{python_sitearch}/pyx/ -%if 0%{?fedora} >= 9 -%{python_sitearch}/*.egg-info -%endif - %changelog +* Mon Jun 20 2011 José Matos - 0.11.1-1 +- New upstream release +- Clean spec file + * Mon Feb 07 2011 Fedora Release Engineering - 0.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index 4a39d91..456fe31 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -20a8697a4b37c3ead10348ad5a49ba1a PyX-0.10.tar.gz -4b473a641144ad6bdecd93e47abcc7be PyX-0.10-manual.pdf +b8bd41d61a164426c162865b2c121f1b PyX-0.11.1.tar.gz +3f88893c862d82073021a8dc5f1cffea manual.pdf