From 79ecf027dd79e642baf623a54a961205a6c34783 Mon Sep 17 00:00:00 2001 From: Pau Aliagas Date: Tue, 4 Oct 2011 10:33:26 +0200 Subject: [PATCH 1/3] Add dependencies to spec file Add spec file for rpm-based systems --- python-mongoengine.spec | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 python-mongoengine.spec diff --git a/python-mongoengine.spec b/python-mongoengine.spec new file mode 100644 index 00000000..054993d4 --- /dev/null +++ b/python-mongoengine.spec @@ -0,0 +1,53 @@ +# sitelib for noarch packages, sitearch for others (remove the unneeded one) +%{!?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))")} + +%define srcname mongoengine + +Name: python-%{srcname} +Version: 0.5.0 +Release: 2%{?dist} +Summary: A Python Document-Object Mapper for working with MongoDB + +Group: Development/Libraries +License: MIT +URL: https://github.com/namlook/mongoengine +Source0: %{srcname}-%{version}.tar.bz2 + +BuildRequires: python-devel +BuildRequires: python-setuptools + +Requires: mongodb +Requires: pymongo +Requires: python-blinker + +%description +MongoEngine is an ORM-like layer on top of PyMongo. + +%prep +%setup -q -n %{srcname}-%{version} + + +%build +# Remove CFLAGS=... for noarch packages (unneeded) +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 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc docs AUTHORS LICENSE README.rst +# For noarch packages: sitelib + %{python_sitelib}/* +# For arch-specific packages: sitearch +# %{python_sitearch}/* + +%changelog +* Fri Sep 23 2011 Pau Aliagas 0.5.0-1 +- Initial version From 181e191feef7a2db0d5b180b57146c01eb8caba5 Mon Sep 17 00:00:00 2001 From: Pau Aliagas Date: Tue, 4 Oct 2011 10:24:44 +0200 Subject: [PATCH 2/3] Add some more files to ignore in .gitignore --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 315674fe..0300bc77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ .* !.gitignore -*.pyc -.*.swp +*~ +*.py[co] +.*.sw[po] *.egg docs/.build docs/_build From 202d6e414f20b31d628403cad21c6275b82409d9 Mon Sep 17 00:00:00 2001 From: Pau Aliagas Date: Wed, 12 Oct 2011 11:03:56 +0200 Subject: [PATCH 3/3] Update spec file --- python-mongoengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-mongoengine.spec b/python-mongoengine.spec index 054993d4..dea5e604 100644 --- a/python-mongoengine.spec +++ b/python-mongoengine.spec @@ -5,8 +5,8 @@ %define srcname mongoengine Name: python-%{srcname} -Version: 0.5.0 -Release: 2%{?dist} +Version: 0.5.2 +Release: 1%{?dist} Summary: A Python Document-Object Mapper for working with MongoDB Group: Development/Libraries @@ -49,5 +49,8 @@ rm -rf $RPM_BUILD_ROOT # %{python_sitearch}/* %changelog +* Wed Oct 12 2011 Pau Aliagas 0.5.2-1 +- Update to latest version + * Fri Sep 23 2011 Pau Aliagas 0.5.0-1 - Initial version