[python-pebl] Initial import (#554464).

Tadej Janež tadej at fedoraproject.org
Sun Oct 16 20:02:46 UTC 2011


commit d46f091dc1d37886f0ad2bcd69e1900e2016fa70
Author: Tadej Janež <tadej.janez at tadej.hicsalta.si>
Date:   Sun Oct 16 22:01:51 2011 +0200

    Initial import (#554464).

 .gitignore                       |    1 +
 README.Fedora                    |   23 ++++++
 pebl-1.0.2-sphinx_building.patch |   14 ++++
 python-pebl.spec                 |  152 ++++++++++++++++++++++++++++++++++++++
 sources                          |    1 +
 5 files changed, 191 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4ecd079 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pebl-1.0.2.tar.gz
diff --git a/README.Fedora b/README.Fedora
new file mode 100644
index 0000000..cc02031
--- /dev/null
+++ b/README.Fedora
@@ -0,0 +1,23 @@
+Notes on Fedora python-pebl Package
+===================================
+
+by Tadej Janež
+updated: April 1, 2010
+
+Two of the PEBL's task controllers, XGrid Task Controller and IPython1 Task
+Controller, are currently not supported on Fedora. They are both optional
+features of PEBL and only affect the use of the above mentioned task
+controllers.
+
+The XGrid Task Controller requires PyXg, which is currently not packaged for
+Fedora.
+
+The IPython1 Task Controller requires IPython1, which was at the time the next
+version of the IPython shell that also included an interactive clustering
+solution. However, IPython1 has ceased to exist since then and the parallel
+processing has been included in IPython >= 0.9. Currently, Fedora 12 includes
+IPython 0.10.
+I acquainted the upstream author with this and he said he is working on
+porting the entire pebl.controllers module to use anyCloud
+(http://code.google.com/p/anycloud/), which in turn uses IPython.
+
diff --git a/pebl-1.0.2-sphinx_building.patch b/pebl-1.0.2-sphinx_building.patch
new file mode 100644
index 0000000..63ad341
--- /dev/null
+++ b/pebl-1.0.2-sphinx_building.patch
@@ -0,0 +1,14 @@
+diff -up pebl-1.0.2/docs/src/conf.py.sphinx_building pebl-1.0.2/docs/src/conf.py
+--- pebl-1.0.2/docs/src/conf.py.sphinx_building	2011-10-08 21:08:45.119093820 +0200
++++ pebl-1.0.2/docs/src/conf.py	2011-10-08 21:12:41.836973648 +0200
+@@ -13,6 +13,10 @@
+ 
+ import sys, os
+ 
++# add Pebl module to sys.path so that the Sphinx documentation can be built
++# during the %build phase of generating the binary package
++sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'src'))
++
+ # If your extensions are in another directory, add it here.
+ #sys.path.append('some/directory')
+ 
diff --git a/python-pebl.spec b/python-pebl.spec
new file mode 100644
index 0000000..ff14468
--- /dev/null
+++ b/python-pebl.spec
@@ -0,0 +1,152 @@
+%global srcname pebl
+
+Name:		python-%{srcname}
+Version:	1.0.2
+Release:	7%{?dist}
+Summary:	PEBL: Python Environment for Bayesian Learning
+
+Group:		Development/Languages
+License:	MIT
+URL:		http://code.google.com/p/pebl-project/
+Source0:	http://pebl-project.googlecode.com/files/%{srcname}-%{version}.tar.gz
+Source1:	README.Fedora
+# Fixes the generation of Sphinx documentation during the %%build phase
+Patch0:		pebl-1.0.2-sphinx_building.patch
+
+BuildRequires:	python2-devel
+BuildRequires:	numpy
+BuildRequires:	python-setuptools
+# The BuildRequires below are needed for building the Sphinx documentation
+BuildRequires:	python-sphinx
+BuildRequires:	pydot
+# The BuildRequires below are needed for performing the unit tests
+BuildRequires:	python-matplotlib
+BuildRequires:	graphviz
+BuildRequires:	python-simplejson
+
+Requires:	numpy
+Requires:	pydot
+# The Requires below are optional, needed for certain types of functionality
+# Requires for creating HTML reports of Pebl results
+Requires:	python-matplotlib
+Requires:	graphviz
+Requires:	python-simplejson
+# Requires for the Amazon EC2 Task Controller
+Requires:	python-boto
+
+# prevent rpm's auto-generated provides mechanism to include Pebl's private
+# libraries
+%{?filter_setup:
+%filter_provides_in %{python_sitearch}/.*\.so$ 
+%filter_setup
+}
+
+%description
+Pebl is a python library and command line application for learning the
+structure of a Bayesian network given prior knowledge and observations.
+Pebl includes the following features:
+- can learn with observational and interventional data
+- handles missing values and hidden variables using exact and heuristic methods
+- provides several learning algorithms; makes creating new ones simple
+- has facilities for transparent parallel execution using several cluster/grid
+resources
+- calculates edge marginals and consensus networks
+- presents results in a variety of formats 
+
+
+%prep
+%setup -q -n %{srcname}-%{version}
+cp %{SOURCE1} .
+%patch0 -p1 -b .sphinx_building
+
+
+%build
+CFLAGS="%{optflags}" %{__python} setup.py build build_sphinx
+
+
+%install
+# --root %%{buildroot} makes the package install with a single, expanded
+# directory in %%{python_sitelib} and a separate egginfo directory.
+%{__python} setup.py install --skip-build --root %{buildroot}
+
+# remove the files needed for performing unittests and manual tests
+rm -r %{buildroot}/%{python_sitearch}/%{srcname}/test
+rm -r %{buildroot}/%{python_sitearch}/%{srcname}/test.manual
+# delete unnecessary source files that rpmlint complains about
+rm %{buildroot}/%{python_sitearch}/%{srcname}/_cpd.c
+rm %{buildroot}/%{python_sitearch}/%{srcname}/_network.c
+# delete a hidden file that rpmlint complains about
+rm docs/build/html/.buildinfo
+# replace the dangling relative symlink that rpmlint complains about with
+# the actual file it points to
+mv docs/src/install.rst INSTALL.txt
+
+# Note: Currently, 219 unit tests are run, 1 fails and 8 have errors.
+# Upstream bug report about this:
+# http://code.google.com/p/pebl-project/issues/detail?id=45
+%check
+%{__python} setup.py test || :
+
+
+%files
+%doc INSTALL.txt LICENSE.txt README.txt README.Fedora
+%doc docs/build/html
+%{_bindir}/%{srcname}
+%{python_sitearch}/%{srcname}/
+%{python_sitearch}/%{srcname}-*.egg-info
+
+
+%changelog
+* Sat Oct 15 2011 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-7
+- rebuilt with new pydot (1.0.25-2) which fixes some of the unit test errors
+
+* Sun Oct 09 2011 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-6
+- implemented fixes suggested by Thomas Spura:
+  - improved the Provides filtering of Pebl's private libraries
+  - enabled unit tests in the %%check section and noted how many are currently
+    failing
+
+* Sat Oct 08 2011 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-5
+- removed the definition of python_sitelib and python_sitearch macros as they
+  are not needed for F-13 and above
+- removed the %%clean section as it is not needed for F-13 and above
+- removed the %%defattr at the beginning of the %%files section as it is not
+  needed anymore
+- removed an obsolete conditional BuildRequires for legacy Fedora releases
+- added a patch that fixes the generation of Sphinx documentation during the
+  %%build phase (provided by Toshio Ernie Kuratomi)
+- added new BuildRequires needed for building the Sphinx documentation
+
+* Tue Jun 15 2010 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-4
+- applied a patch from Toshio Ernie Kuratomi, which:
+    - adds BuildRequire on numpy
+    - changes the filter string to filter out the private shared .so's
+
+* Thu Jun 03 2010 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-3
+- updated the spec file to conform to the newest Python packaging guidelines
+- implemented fixes suggested by Thomas Spura:
+    - disabled rpmbuild's internal dependency generator to prevent erroneous
+      provides for _cpd.so and _network.so
+    - removed the files needed for performing unittests and manual tests from
+      final rpm
+
+* Thu Apr 01 2010 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-2
+- added README.Fedora which explains, why XGrid and IPython1 task controllers
+  are not working at the moment
+- removed files that rpmlint complains about
+- replaced a dangling relative symlink with the actual file it points to
+
+* Tue Jan 26 2010 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.2-1
+- update to version 1.0.2
+- dropped pebl-1.0.1-build_sphinx.patch (now included upstream)
+- implemented fixes suggested by Thomas Spura:
+    - dropped Requires: python
+    - changed BuildRequires from python-setuptools-devel to python-setuptools
+    - fixed %%files section to notice, when the eggs can't be built
+    - added %%check section, which runs the unittests
+    - added missing Requires: numpy, pydot, python-matplotlib, graphviz,
+      python-simplejson, python-boto
+
+* Mon Jan 04 2010 Tadej Janež <tadej.janez at tadej.hicsalta.si> 1.0.1-1
+- initial package
+
diff --git a/sources b/sources
index e69de29..6c870f5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+cc656223e978a1b207782ecb5f387f86  pebl-1.0.2.tar.gz


More information about the scm-commits mailing list