source: projects/specs/branches/6/p/python-unipath/python-unipath-vl.spec @ 5795

Revision 5795, 3.1 KB checked in by Takemikaduchi, 12 years ago (diff)

rebuild package

Line 
1%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2
3%global oname   Unipath
4
5Summary:        Alternative to Python modules os, os.path and shutil
6Name:           python-unipath
7Version:        0.2.1
8Release:        3%{?_dist_release}
9License:        Python
10Group:          Development/Tools
11URL:            http://pypi.python.org/pypi/Unipath/
12Source0:        http://pypi.python.org/packages/source/U/Unipath/%{oname}-%{version}.tar.gz
13BuildArch:      noarch
14BuildRequires:  python-devel
15BuildRequires:  python-setuptools python-nose nkf
16BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18%description
19Unipath is a package for doing pathname calculations and filesystem
20access in an object-oriented manner, an alternative to functions in
21os.path, shutil and glob, and even some functions in os.* It's based
22on Jason Orendorff's path.py but does not adhere as strictly to the
23underlying functions' syntax, in order to provide more user
24convenience and higher-level functionality. For example:
25
26 o p.mkdir() succeeds silently if the directory already exists, and
27 o p.mkdir(True) creates intermediate directories a la os.makedirs.
28 o p.rmtree(parents=True) combines shutil.rmtree, os.path.isdir,
29   os.remove, and os.removedirs, to recursively remove whatever it is
30   if it exists.
31 o p.read_file("rb") returns the file's contents in binary mode.
32 o p.needs_update([other_path1, ...]) returns True if p doesn't exist
33   or has an older timestamp than any of the others.
34 o extra convenience functions in the unipath.tools module. dict2dir
35   creates a directory hierarchy described by a dict. dump_path displays
36   an ASCII tree of a directory hierarchy.
37
38%prep
39%setup -q -n %{oname}-%{version}
40for f in doc/reference/{test_,}path_nr.py ; do
41    nkf --unix --overwrite $f
42done
43for f in README.txt doc/reference/path_355.py ; do
44    iconv -f ISO-8859-1 -t UTF-8 -o $f.utf8 $f && \
45    touch -r $f $f.utf8 && \
46    %{__mv} $f.utf8 $f
47done
48
49# To avoid warning about script without execute bit set
50%{__sed} -i -e '1d' unipath/test.py
51
52%build
53%{__python} setup.py build
54
55%install
56%{__rm} -rf %{buildroot}
57%{__python} setup.py install -O1 --skip-build --root %{buildroot}
58
59%clean
60%{__rm} -rf %{buildroot}
61
62%check
63%{__cp} unipath/test.py .
64%{__python} test.py
65
66%files
67%defattr(-, root, root, -)
68%doc BUGS.txt CHANGES doc/reference/ PKG-INFO README.html README.txt
69%{python_sitelib}/unipath/
70%{python_sitelib}/%{oname}-%{version}-py*.*.egg-info
71
72%changelog
73* Thu Mar 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2.1-3
74- rebuild with Vine6 environment
75- add BuildRequires: python-devel
76
77* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.2.1-2
78- rebuild with python-2.6.4
79
80* Thu Oct 22 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.2.1-1
81- initial build for Vine Linux based on fedora development
82
83* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-3
84- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
85
86* Tue Apr 14 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.2.1-2
87- Minor changes taken from review
88
89* Sun Mar 29 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.2.1-1
90- initial build
Note: See TracBrowser for help on using the repository browser.