[amp] 01/01: Moved package to pybuild.

Muammar El Khatib muammar at moszumanska.debian.org
Tue Aug 1 14:46:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

muammar pushed a commit to branch master
in repository amp.

commit c59a6d4002935cd3ba4740a68eda256ad66af2df
Author: Muammar El Khatib <muammarelkhatib at gmail.com>
Date:   Tue Aug 1 10:38:38 2017 -0400

    Moved package to pybuild.
---
 amp/Makefile                     |  2 +-
 debian/control                   | 38 +-------------------------------------
 debian/patches/01_Makefile.patch | 13 +++++++++++++
 debian/patches/series            |  1 +
 debian/python-amp.pyinstall      |  7 -------
 debian/python3-amp.pyinstall     |  2 +-
 debian/rules                     | 37 ++++++++-----------------------------
 7 files changed, 25 insertions(+), 75 deletions(-)

diff --git a/amp/Makefile b/amp/Makefile
index e319b34..d7d027e 100644
--- a/amp/Makefile
+++ b/amp/Makefile
@@ -6,7 +6,7 @@ python2:
 python3:
 	+$(MAKE) -C model
 	+$(MAKE) -C descriptor
-	f2py3 -c -m fmodules model.f90 descriptor/cutoffs.f90 descriptor/gaussian.f90 descriptor/zernike.f90 model/neuralnetwork.f90
+	f2py3.6 -c -m fmodules model.f90 descriptor/cutoffs.f90 descriptor/gaussian.f90 descriptor/zernike.f90 model/neuralnetwork.f90
 
 AMPDIR:=$(shell pwd)
 
diff --git a/debian/control b/debian/control
index 10cc55a..b7965e7 100644
--- a/debian/control
+++ b/debian/control
@@ -6,15 +6,6 @@ Uploaders: Muammar El Khatib <muammar at debian.org>
 Build-Depends: debhelper (>= 9),
                dh-python,
                gfortran,
-               python-all-dev (>= 2.6.6-3~),
-               python-ase (>= 3.9.0~),
-               python-matplotlib,
-               python-nose,
-               python-numpy,
-               python-scipy,
-               python-setuptools,
-               python-pexpect,
-               python-zmq,
                python3-all-dev,
                python3-ase (>= 3.9.0~),
                python3-matplotlib,
@@ -25,39 +16,12 @@ Build-Depends: debhelper (>= 9),
                python3-pexpect,
                python3-zmq,
                openssh-server
-X-Python-Version: >= 2.6
-X-Python3-Version: >= 3.5
+X-Python3-Version: >= 3.6
 Standards-Version: 4.0.0
 Homepage: https://bitbucket.org/andrewpeterson/amp
 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/amp.git
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/amp.git/
 
-Package: python-amp
-Architecture: any
-Depends: python-ase (>= 3.14~),
-         python-scipy,
-         ${misc:Depends},
-         ${python:Depends},
-         ${shlibs:Depends}
-Recommends: python-matplotlib
-Breaks: ${python:Breaks}
-Description: Atomistic Machine-learning Package (python 2)
- Amp is an open-source package designed to easily bring machine-learning to
- atomistic calculations. This project is being developed at Brown University in
- the School of Engineering, primarily by Andrew Peterson and Alireza Khorshidi,
- and is released under the GNU General Public License. Amp allows for the
- modular representation of the potential energy surface, allowing the user to
- specify or create descriptor and regression methods.
- .
- Amp is designed to integrate closely with the Atomic Simulation Environment
- (ASE). As such, the interface is in pure python, although several
- compute-heavy parts of the underlying code also have fortran versions to
- accelerate the calculations. The close integration with ASE means that any
- calculator that works with ASE ─ including EMT, GPAW, DACAPO, VASP, NWChem,
- and Gaussian ─ can easily be used as the parent method.
- .
- This package provides the python 2 modules.
-
 Package: python3-amp
 Architecture: any
 Depends: python3-ase (>= 3.14.0~),
diff --git a/debian/patches/01_Makefile.patch b/debian/patches/01_Makefile.patch
new file mode 100644
index 0000000..157d822
--- /dev/null
+++ b/debian/patches/01_Makefile.patch
@@ -0,0 +1,13 @@
+Index: amp/amp/Makefile
+===================================================================
+--- amp.orig/amp/Makefile
++++ amp/amp/Makefile
+@@ -6,7 +6,7 @@ python2:
+ python3:
+ 	+$(MAKE) -C model
+ 	+$(MAKE) -C descriptor
+-	f2py3 -c -m fmodules model.f90 descriptor/cutoffs.f90 descriptor/gaussian.f90 descriptor/zernike.f90 model/neuralnetwork.f90
++	f2py3.6 -c -m fmodules model.f90 descriptor/cutoffs.f90 descriptor/gaussian.f90 descriptor/zernike.f90 model/neuralnetwork.f90
+ 
+ AMPDIR:=$(shell pwd)
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c3de10c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_Makefile.patch
diff --git a/debian/python-amp.pyinstall b/debian/python-amp.pyinstall
deleted file mode 100644
index 9a334e5..0000000
--- a/debian/python-amp.pyinstall
+++ /dev/null
@@ -1,7 +0,0 @@
-amp/*.py
-amp/descriptor/*.py
-amp/model/*.py
-amp/regression/*.py
-amp/*.so
-amp/fmodules.so
-tests/*.py
diff --git a/debian/python3-amp.pyinstall b/debian/python3-amp.pyinstall
index 9731434..ac71b0d 100644
--- a/debian/python3-amp.pyinstall
+++ b/debian/python3-amp.pyinstall
@@ -2,5 +2,5 @@ amp/*.py
 amp/descriptor/*.py
 amp/model/*.py
 amp/regression/*.py
-amp/fmodules.cpython-35m-x86_64-linux-gnu.so
+amp/*.so
 tests/*.py
diff --git a/debian/rules b/debian/rules
index 2d4737a..1f2f003 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+export PYBUILD_NAME=amp
 export DEB_FFLAGS_MAINT_APPEND=-fPIC
 export DEB_LDFLAGS_MAINT_APPEND=-shared
 
@@ -12,14 +13,10 @@ GIT = 'https://bitbucket.org/andrewpeterson/amp'
 # The full changelog version number, used for the orig.tar.gz
 VER=$(shell dpkg-parsechangelog -ldebian/changelog -SVersion | cut -d- -f1)
 
-%:
-	dh $@ --with python2,python3
+export PYBUILD_BEFORE_TEST_python3=cp -r tests {build_dir}; cd amp; make python3; cp *.so *.mod {build_dir}/amp
 
-override_dh_python2:
-	cd $(CURDIR)/amp/; \
-	make python2
-	dh_python2
-	dh_numpy
+%:
+	dh $@ --with python3 --buildsystem=pybuild
 
 override_dh_python3:
 	cd $(CURDIR)/amp/; \
@@ -28,31 +25,13 @@ override_dh_python3:
 	dh_numpy
 
 override_dh_auto_test:
-	cd $(CURDIR)/amp/; \
-	make python2
-	cd $(CURDIR)/amp/; \
-	make python3
-ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
-	set -ex; for python in $(shell pyversions -d) ; do \
-	mkdir python2; \
-	cd python2; \
-		$$python /usr/bin/nosetests -v ../; \
-	cd ..; \
-	rm -rf python2; \
-	done
-
-	set -ex; for python in $(shell py3versions -d) ; do \
-	mkdir python3; \
-	cd python3; \
-		$$python /usr/bin/nosetests3 -v ../; \
-	cd ..; \
-	rm -rf python3; \
-	done
-endif
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="cd {build_dir}; {interpreter} /usr/bin/nosetests3 tests" \
+	dh_auto_test
 
 override_dh_auto_clean:
 	dh_auto_clean
-	rm -rf amp.egg-info/ python2/ python3/
+	rm -rf amp.egg-info/ python3/
 	find . -name "*.json" -delete
 	find . -name "*-train-log.txt" -delete
 	find . -name "*.pyc" -delete

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/amp.git



More information about the debian-science-commits mailing list