[python-Traits: 6/6] New upstream release

supercyper supercyper at fedoraproject.org
Fri Aug 13 06:47:34 UTC 2010


commit b1eb9b459098a0a973367ae7e71301fd13eb3ad4
Author: Chen Lei <supercyper at 163.com>
Date:   Fri Aug 13 14:46:46 2010 +0800

    New upstream release

 .gitignore         |    2 +-
 python-Traits.spec |   83 ++++++++++++++++++++++++++++-----------------------
 sources            |    2 +-
 3 files changed, 48 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 51a918c..ccb8fba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-Traits-3.2.0.tar.gz
+Traits-3.4.0.tar.gz
diff --git a/python-Traits.spec b/python-Traits.spec
index 181c4ca..61cd5a1 100644
--- a/python-Traits.spec
+++ b/python-Traits.spec
@@ -1,22 +1,17 @@
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-
 Name:           python-Traits
-Version:        3.2.0
-Release:        2%{?dist}
+Version:        3.4.0
+Release:        1%{?dist}
 Summary:        Explicitly typed attributes for Python
-
-Group:          Development/Languages
+Group:          Development/Libraries
 # Images have different licenses. For image license breakdown check
 # image_LICENSE.txt file. Except enthought/traits/ui/editors_gen.py
 # which is GPLv2+ all remaining source or image files are in BSD
 # 3-clause license. Confirmed from upstream.
 License:        BSD and EPL and LGPLv2 and GPLv2+
 URL:            http://code.enthought.com/projects/traits/
-
-Source0:        http://pypi.python.org/packages/source/T/Traits/Traits-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires:  python-setupdocs, python-setuptools, numpy, python-devel
+Source0:        http://www.enthought.com/repo/ETS/Traits-%{version}.tar.gz
+BuildRequires:  python-setupdocs, python-setuptools, python2-devel
+Requires:       numpy
 
 %description
 The traits package developed by Enthought provides a special type
@@ -33,20 +28,27 @@ attributes, traits also have several additional characteristics:
   modification of a trait's value can be automatically constructed
   using the trait's definition.
 
-
 %prep
 %setup -q -n Traits-%{version}
 
-# fix wrong-file-end-of-line-encoding
-find examples \( -type f -o -name '*py' \
- -o -name '*desc' -o -name '*txt' \) -print \
- | sed 's/\ /\\ /g' | xargs sed -i 's/\r//'
-ls *txt | sed 's/\ /\\ /g' | xargs sed -i 's/\r//'
-sed -i 's/\r//' enthought/traits/protocols/unused_setup
+rm -rf *.egg-info
 
-# scripts having 644 permission
-chmod 755 enthought/traits/protocols/unused_setup
-chmod 755 enthought/traits/ui/unused_setup
+# fix wrong-file-end-of-line-encoding
+OLDIFS=$IFS
+IFS=:
+for file in `find examples \( -name "*.py" -o -name "*.desc" -o -name \
+ "*.txt" \) -printf "%p$IFS"`; do 
+ sed "s|\r||g" $file > $file.new && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
+IFS=$OLDIFS
+
+for file in *.txt; do
+ sed "s|\r||g" $file > $file.new && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
 
 # file not utf-8
 iconv -f iso8859-1 -t utf-8 image_LICENSE_Eclipse.txt \
@@ -54,32 +56,39 @@ iconv -f iso8859-1 -t utf-8 image_LICENSE_Eclipse.txt \
  image_LICENSE_Eclipse.txt.conv image_LICENSE_Eclipse.txt
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py release build
-
+CFLAGS="$RPM_OPT_FLAGS" python setup.py build
 
 %install
-rm -rf $RPM_BUILD_ROOT
 python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-sed -i 's/\.dev$//g' $RPM_BUILD_ROOT/%{python_sitearch}/Traits-%{version}-*.egg-info/requires.txt
-
-rm $RPM_BUILD_ROOT/%{python_sitearch}/enthought/traits/protocols/_speedups.c
-rm $RPM_BUILD_ROOT/%{python_sitearch}/enthought/traits/ctraits.c
-
-# Prevents non standard permissions
-chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/enthought/traits/protocols/_speedups.so
-chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/enthought/traits/ctraits.so
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{python_sitearch}/enthought/traits/protocols/_speedups.c
+rm $RPM_BUILD_ROOT%{python_sitearch}/enthought/traits/ctraits.c
+find $RPM_BUILD_ROOT%{python_sitearch}/enthought -name "unused_setup*" \
+ | xargs rm {} ";"
 
+# fix wrong-file-end-of-line-encoding
+for file in `find build/docs -name "*.txt" -o -name "*.css" -o -name \
+ "*.py"`; do
+ sed "s|\r||g" $file > $file.new && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
 
 %files
 %defattr(-,root,root,-)
-%doc *.txt examples/ docs/*.pdf
-%{python_sitearch}/*
-
+%doc *.txt docs/*.pdf examples
+%doc docs/traitsdocreadme.txt docs/CHANGES.txt build/docs/html
+%dir %{python_sitearch}/enthought
+%{python_sitearch}/*.egg-info
+%{python_sitearch}/*.pth
+%{python_sitearch}/enthought/traits
 
 %changelog
+* Fri Aug 13 2010 Chen Lei <supercyper at 163.com> 3.4.0-1
+- Update spec to match latest guidelines w.r.t %%clean
+- Fix timestamps for example files
+- Remove BR:numpy
+
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 3.2.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 
diff --git a/sources b/sources
index d372a15..ee9df4f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-630469da5cedea81f692849c6d92ac9a  Traits-3.2.0.tar.gz
+ab947ff8b065991eb4bc9cf04b3972b3  Traits-3.4.0.tar.gz


More information about the scm-commits mailing list