[python-gensim/el5] uploaded python-gensim-0.9.2-git20140510-d1c6d58.tar.gz
by Björn 'besser82' Esser
commit 582d2974feb18df28ca2f1e9e9bdb35d485cc640
Author: Björn Esser <bjoern.esser(a)gmail.com>
Date: Sun May 11 11:12:07 2014 +0200
uploaded python-gensim-0.9.2-git20140510-d1c6d58.tar.gz
sources | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sources b/sources
index 59880eb..178a0ee 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1e5f599f7f7990fb4c0dbb4aa0ab03a4 python-gensim-0.9.2-git20140423-e56d7fd.tar.gz
+29df5d1c99ffc26f29f72a79bfdee2be python-gensim-0.9.2-git20140510-d1c6d58.tar.gz
9 years, 6 months
[python-gensim/el5] updated to new snapshot git20140510.d1c6d58b9acfec97e6c5d677c652293ae2119276 add Python3-build minor
by Björn 'besser82' Esser
commit ccc1f55caec3258537a65d89e2d73c5252077f5d
Author: Björn Esser <bjoern.esser(a)gmail.com>
Date: Sun May 11 11:10:54 2014 +0200
updated to new snapshot git20140510.d1c6d58b9acfec97e6c5d677c652293ae2119276
add Python3-build
minor improvements to spec-file
python-gensim.spec | 140 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 130 insertions(+), 10 deletions(-)
---
diff --git a/python-gensim.spec b/python-gensim.spec
index 41d2844..6e873e8 100644
--- a/python-gensim.spec
+++ b/python-gensim.spec
@@ -2,15 +2,20 @@
#%%global rel_build 1
# Settings used for build from snapshots.
-%{!?rel_build:%global commit e56d7fd1bb643d772030e645442af3961a4b88aa}
-%{!?rel_build:%global commit_date 20140423}
+%{!?rel_build:%global commit d1c6d58b9acfec97e6c5d677c652293ae2119276}
+%{!?rel_build:%global commit_date 20140510}
%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
%{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}}
%{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}}
%{!?rel_build:%global gittar %{name}-%{version}-%{gitver}.tar.gz}
%{?rel_build: %global gittar %{name}-%{version}.tar.gz}
-%global common_description \
+# Can we build a Py3-pkg?
+%if 0%{?fedora} || 0%{?rhel} >= 8
+%global with_python3 1
+%endif #0%{?fedora} || 0%{?rhel} >= 8
+
+%global common_description \
Gensim is a Python library for topic modelling, document indexing \
and similarity retrieval with large corpora. Target audience is \
the natural language processing (NLP) and information retrieval \
@@ -38,7 +43,7 @@ multiple cores. \
Name: python-%{pypi_name}
Version: 0.9.2
-Release: 0.1%{?gitrel}%{?dist}
+Release: 0.2%{?gitrel}%{?dist}
Summary: Python framework for fast Vector Space Modelling
License: LGPLv2
@@ -58,7 +63,7 @@ Summary: Highly optimized version of word2vec for %{pypi_name}
BuildRequires: Cython
Requires: numpy%{?_isa}
-Requires: %{name} == %{version}-%{release}
+Requires: %{name} == %{version}-%{release}
Requires: scipy%{?_isa}
%description addons
@@ -86,7 +91,7 @@ Requires: numpy
Requires: python-six
Requires: scipy
-Provides: %{name} == %{version}-%{release}
+Provides: %{name} == %{version}-%{release}
%description core
This package contains the pure Python implementation of %{pypi_name}.
@@ -116,14 +121,76 @@ BuildArch: noarch
BuildRequires: python-nose
Requires: python-nose
-Requires: %{name} == %{version}-%{release}
-Requires: %{name}-addons == %{version}-%{release}
+Requires: %{name} == %{version}-%{release}
+Requires: %{name}-addons == %{version}-%{release}
%description test
This package provides the testsuite for %{name}. You don't need it
for everyday usage.
+%if 0%{?with_python3}
+%package -n python3-%{pypi_name}-addons
+Summary: Highly optimized version of word2vec for %{pypi_name}
+
+BuildRequires: python3-Cython
+
+Requires: python3-numpy%{?_isa}
+Requires: python3-%{name} == %{version}-%{release}
+Requires: python3-scipy%{?_isa}
+
+%description -n python3-%{pypi_name}-addons
+This package contains the highly optimized version of word2vec from
+%{pypi_name}. It is highly recommend to use this. If you don't need
+the highly optimized version of word2vec, it is sufficient to install
+the "%{name}-core"-package.
+
+%{common_description}
+
+
+%package -n python3-%{pypi_name}-core
+Summary: Python framework for fast Vector Space Modelling
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-numpy
+BuildRequires: python3-scipy
+BuildRequires: python3-setuptools
+BuildRequires: python3-six
+
+Requires: python3-numpy
+Requires: python3-scipy
+Requires: python3-six
+
+Provides: python3-%{name} == %{version}-%{release}
+
+%description -n python3-%{pypi_name}-core
+This package contains the pure Python implementation of %{pypi_name}.
+If you don't need the highly optimized version of word2vec, it is
+sufficient to install this package. Otherwise installing the
+"%{name}-addons"-package is strongly recommended.
+
+%{common_description}
+
+
+%package -n python3-%{pypi_name}-test
+Summary: Testsuite for %{name}
+
+BuildArch: noarch
+
+BuildRequires: python3-nose
+
+Requires: python3-nose
+Requires: python3-%{name} == %{version}-%{release}
+Requires: python3-%{name}-addons == %{version}-%{release}
+
+%description -n python3-%{pypi_name}-test
+This package provides the testsuite for %{name}. You don't need it
+for everyday usage.
+%endif #0%{?with_python3}
+
+
%prep
%setup -q%{?rel_build:n %{pypi_name}-%{version}}%{!?rel_build:n %{pypi_name}-%{commit}}
@@ -138,8 +205,8 @@ touch -r ${_file}.orig ${_file} && rm -rf ${_file}.orig
# Remove hashbangs
for _file in `find . -type f -name '*.py'`
do
- sed '1{\@^#!/usr/bin/env python@d}' ${_file} > ${_file}.new &&
- touch -r ${_file} ${_file}.new &&
+ sed '1{\@^#!/usr/bin/env python@d}' ${_file} > ${_file}.new && \
+ touch -r ${_file} ${_file}.new && \
mv -f ${_file}.new ${_file}
done
@@ -149,13 +216,32 @@ sed -i -e 's!^DEFAULT_VERSION = "1.3.2"!DEFAULT_VERSION = "0.9"!' ez_setup.py
# Bump version in setup.py
%{!?rel_build:sed -i -e 's!0\.9\.1!%{version}!' setup.py}
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif #0%{?with_python3}
+
%build
%{__python2} setup.py build
+# Build the Python3-version.
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif #0%{?with_python3}
+
%install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif #0%{?with_python3}
+
find %{buildroot} -type f -name '*.pyx' -print0 | xargs -0 rm -f
%fdupes %{buildroot}
@@ -178,6 +264,14 @@ pushd %{buildroot}%{python2_sitelib}/%{pypi_name}
nosetests -v
popd
+%if 0%{?with_python3}
+PYTHONPATH="%{buildroot}%{python3_sitelib}"
+export PYTHONPATH="${PYTHONPATH}:%{buildroot}%{python3_sitearch}"
+pushd %{buildroot}%{python3_sitelib}/%{pypi_name}
+nosetests-%{python3_version} -v
+popd
+%endif #0%{?with_python3}
+
%files addons
%{python2_sitearch}/%{pypi_name}_addons
@@ -199,6 +293,32 @@ popd
%{python2_sitelib}/%{pypi_name}/nosy.py*
%{python2_sitelib}/%{pypi_name}/test
+%if 0%{?with_python3}
+%files -n python3-%{pypi_name}-addons
+%{python3_sitearch}/%{pypi_name}_addons
+%{python3_sitearch}/%{pypi_name}_addons-%{version}-py%{python3_version}.egg-info
+
+%files -n python3-%{pypi_name}-core
+%doc CHANGELOG* COPYING* README*
+%dir %{python3_sitelib}/%{pypi_name}
+%exclude %{python3_sitelib}/%{pypi_name}/nosy.py
+%exclude %{python3_sitelib}/%{pypi_name}/__pycache__/nosy*
+%exclude %{python3_sitelib}/%{pypi_name}/test
+%{python3_sitelib}/%{pypi_name}/*
+%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
+
+%files -n python3-%{pypi_name}-test
+%{python3_sitelib}/%{pypi_name}/nosy.py
+%{python3_sitelib}/%{pypi_name}/__pycache__/nosy*
+%{python3_sitelib}/%{pypi_name}/test
+%endif #0%{?with_python3}
+
+
+%changelog
+* Sun May 11 2014 Björn Esser <bjoern.esser(a)gmail.com> - 0.9.2-0.2.git20140510.d1c6d58
+- updated to new snapshot git20140510.d1c6d58b9acfec97e6c5d677c652293ae2119276
+- add Python3-build
+- minor improvements to spec-file
%changelog
* Thu May 01 2014 Björn Esser <bjoern.esser(a)gmail.com> - 0.9.2-0.1.git20140423.e56d7fd
9 years, 6 months
[python-ngram] initial import (#1096188)
by Björn 'besser82' Esser
Summary of changes:
09a261b... initial import (#1096188) (*)
(*) This commit already existed in another branch; no separate mail sent
9 years, 6 months
[python-ngram/el6] initial import (#1096188)
by Björn 'besser82' Esser
commit 09a261ba13bdb880ff3ecf75f54041cfa50dfe67
Author: Björn Esser <bjoern.esser(a)gmail.com>
Date: Fri May 9 16:13:57 2014 +0200
initial import (#1096188)
.gitignore | 5 ++
python-ngram.spec | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 187 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..090749b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*~
+*.rpm
+*.tar*
+*.zip
+results_*/
diff --git a/python-ngram.spec b/python-ngram.spec
new file mode 100644
index 0000000..6801bc8
--- /dev/null
+++ b/python-ngram.spec
@@ -0,0 +1,181 @@
+# Conditional for release and snapshot builds. Uncomment for release-builds.
+%global rel_build 1
+
+# Failsafe backport of Python2-macros for RHEL <= 6
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%{!?python_version: %global python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")}
+%{!?__python2: %global __python2 %{__python}}
+%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
+%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
+%{!?python2_version: %global python2_version %{python_version}}
+
+# Settings used for build from snapshots.
+%{!?rel_build:%global commit 282578b9ef65aa2ec72153d6eb1fcff5c273a42f}
+%{!?rel_build:%global commit_date 20121007}
+%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
+%{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}}
+%{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}}
+%{!?rel_build:%global gittar %{name}-%{version}-%{gitver}.tar.gz}
+%{?rel_build: %global gittar %{name}-%{version}.tar.gz}
+
+# Can we build a Py3-pkg?
+%if 0%{?fedora} || 0%{?rhel} >= 8
+%global with_python3 1
+%endif #0%{?fedora} || 0%{?rhel} >= 8
+
+%global common_description \
+The NGram class extends the Python 'set' class with efficient fuzzy \
+search for members by means of an N-gram similarity measure. It \
+also has static methods to compare a pair of strings. \
+ \
+The N-grams are character based not word-based, and the class does \
+not implement a language model, merely searching for members by \
+string similarity.
+
+%global pypi_name ngram
+
+Name: python-%{pypi_name}
+Version: 3.3.0
+Release: 1%{?gitrel}%{?dist}
+Summary: Set-based subclass providing fuzzy search based on N-grams
+
+License: LGPLv3+
+URL: https://github.com/gpoulter/%{name}
+# Sources for release-builds.
+%{?rel_build:Source0: %{url}/archive/%{version}.tar.gz#/%{gittar}}
+# Sources for snapshot-builds.
+%{!?rel_build:Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}}
+
+BuildArch: noarch
+
+BuildRequires: python-nose
+BuildRequires: python2-devel
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+BuildRequires: python-argparse
+
+Requires: python-argparse
+%endif #0%{?rhel} && 0%{?rhel} <= 6
+
+%description
+%{common_description}
+
+
+%package doc
+Summary: Documentation-files for %{name}
+
+# On RHEL <= 6 we need sphinx-10-build from EPEL.
+%if 0%{?fedora} || 0%{?rhel} >= 7
+BuildRequires: python-sphinx
+%else #0%{?fedora} || 0%{?rhel} >= 7
+BuildRequires: python-sphinx10
+%endif #0%{?fedora} || 0%{?rhel} >= 7
+
+%description doc
+This package contains the documentation-files for %{name}.
+
+
+%if 0%{?with_python3}
+%package -n python3-%{pypi_name}
+Summary: Set-based subclass providing fuzzy search based on N-grams
+
+BuildRequires: python3-devel
+BuildRequires: python3-nose
+
+%description -n python3-%{pypi_name}
+%{common_description}
+%endif #0%{?with_python3}
+
+
+%prep
+%setup -q%{!?rel_build:n %{name}-%{commit}}
+rm -rf *%{pypi_name}*.egg-info
+
+# On RHEL <= 6 we need sphinx-10-build from EPEL.
+%if 0%{?rhel} && 0%{?rhel} <= 6
+sed -i -e 's!sphinx-build$!%{_bindir}/sphinx-1.0-build!' docs/Makefile
+%endif #0%{?rhel} && 0%{?rhel} <= 6
+
+# Fix path to script in testsuite.
+sed -i -e 's!csvjoin.py!scripts/&!g' tests/test_csvjoin.py
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif #0%{?with_python3}
+
+
+%build
+%{__python2} setup.py build
+
+# Build the autodocs.
+pushd docs
+make %{?_smp_mflags} html
+rm -f _build/html/.buildinfo
+find _build/html -type f -print0 | xargs -0 sed -i -e 's!\r$!!'
+popd
+
+# Build the Python3-version.
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif #0%{?with_python3}
+
+
+%install
+# Prefer the scripts in %%{_bindir} from Python2-pkg.
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+rm -f %{buildroot}%{_bindir}/*
+popd
+%endif #0%{?with_python3}
+
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+
+# Fixup the hashbang in Python-scripts.
+# Remove the file-ext from Python-scripts.
+for _file in %{buildroot}/%{_bindir}/*
+do
+ _new="`echo ${_file} | sed -e 's!.py$!!'`"
+ sed -e '1s@^#!.*python$(a)#!%{__python2}@' < ${_file} > ${_new} && \
+ chmod 0755 ${_new} && \
+ touch -r ${_file} ${_new} && \
+ rm -f ${_file}
+done
+
+
+%check
+export PYTHONPATH="`pwd`"
+nosetests -v
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+export PYTHONPATH="`pwd`"
+nosetests-%{python3_version} -v
+popd
+%endif #0%{?with_python3}
+
+%files
+%doc COPYING* README
+%{_bindir}/csvjoin
+%{python2_sitelib}/%{pypi_name}.py*
+%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info
+
+%files doc
+%doc COPYING* README docs/_build/html
+
+%if 0%{?with_python3}
+%files -n python3-%{pypi_name}
+%doc COPYING* README
+%{python3_sitelib}/__pycache__/%{pypi_name}.cpython-%(echo %{python3_version} | sed -e 's!\.!!g').py?
+%{python3_sitelib}/%{pypi_name}.py*
+%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
+%endif #0%{?with_python3}
+
+
+%changelog
+* Fri May 09 2014 Björn Esser <bjoern.esser(a)gmail.com> - 3.3.0-1
+- initial rpm release (#1096188)
diff --git a/sources b/sources
index e69de29..42dd733 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+e1479aa66a05476709a2deed62d777f5 python-ngram-3.3.0.tar.gz
9 years, 6 months