From eed3b71bc8b663b7b87556c195c1ac34af1912ca Mon Sep 17 00:00:00 2001 From: Samer Afach Date: Fri, 13 Jan 2017 12:05:58 +0100 Subject: [PATCH] Added examples to the installation, and modified the Makefile to remove the temp version file. --- MANIFEST.in | 4 ++-- Makefile | 1 + setup.py | 4 ++-- .../examples}/TimeDependent/MagneticResonance.py | 0 {examples => spintrum/examples}/ZULF/acetonitrile.py | 0 {examples => spintrum/examples}/ZULF/benzene.py | 0 {examples => spintrum/examples}/ZULF/benzene_fit.py | 0 {examples => spintrum/examples}/ZULF/ethanol_fit.py | 0 {examples => spintrum/examples}/ZULF/formamide.py | 0 {examples => spintrum/examples}/ZULF/formicacid_fit.py | 0 {examples => spintrum/examples}/ZULF/methylformate.py | 0 {examples => spintrum/examples}/ZULF/methylformate_fit.py | 0 {examples => spintrum/examples}/ZULF/toluene.py | 0 {examples => spintrum/examples}/data/benzeneFitResult.txt | 0 {examples => spintrum/examples}/data/benzeneSignal.txt | 0 {examples => spintrum/examples}/data/ethanolFitResult.txt | 0 {examples => spintrum/examples}/data/ethanolSignal.txt | 0 {examples => spintrum/examples}/data/formamideSignal.txt | 0 {examples => spintrum/examples}/data/formicacidFitResult.txt | 0 {examples => spintrum/examples}/data/formicacidSignal.txt | 0 .../examples}/data/methylformateFitResult.txt | 0 {examples => spintrum/examples}/data/methylformateSignal.txt | 0 22 files changed, 5 insertions(+), 4 deletions(-) rename {examples => spintrum/examples}/TimeDependent/MagneticResonance.py (100%) rename {examples => spintrum/examples}/ZULF/acetonitrile.py (100%) rename {examples => spintrum/examples}/ZULF/benzene.py (100%) rename {examples => spintrum/examples}/ZULF/benzene_fit.py (100%) rename {examples => spintrum/examples}/ZULF/ethanol_fit.py (100%) rename {examples => spintrum/examples}/ZULF/formamide.py (100%) rename {examples => spintrum/examples}/ZULF/formicacid_fit.py (100%) rename {examples => spintrum/examples}/ZULF/methylformate.py (100%) rename {examples => spintrum/examples}/ZULF/methylformate_fit.py (100%) rename {examples => spintrum/examples}/ZULF/toluene.py (100%) rename {examples => spintrum/examples}/data/benzeneFitResult.txt (100%) rename {examples => spintrum/examples}/data/benzeneSignal.txt (100%) rename {examples => spintrum/examples}/data/ethanolFitResult.txt (100%) rename {examples => spintrum/examples}/data/ethanolSignal.txt (100%) rename {examples => spintrum/examples}/data/formamideSignal.txt (100%) rename {examples => spintrum/examples}/data/formicacidFitResult.txt (100%) rename {examples => spintrum/examples}/data/formicacidSignal.txt (100%) rename {examples => spintrum/examples}/data/methylformateFitResult.txt (100%) rename {examples => spintrum/examples}/data/methylformateSignal.txt (100%) diff --git a/MANIFEST.in b/MANIFEST.in index a4df41b..6e2d50b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ recursive-include spintrum/OpenBLAS_install * recursive-include src * -recursive-include examples * +recursive-include spintrum/examples * include CMakeLists.txt - +include get_version.py diff --git a/Makefile b/Makefile index d5e0ab8..9ea588a 100644 --- a/Makefile +++ b/Makefile @@ -23,3 +23,4 @@ clean: rm -rf CMakeCache.txt rm -rf CMakeFiles rm -rf cmake_install.cmake + rm -rf TEMP_VERSION.txt diff --git a/setup.py b/setup.py index eac9bc3..4668112 100644 --- a/setup.py +++ b/setup.py @@ -179,7 +179,7 @@ def recursive_glob(rootdir, pattern='*'): for looproot, _, filenames in os.walk(rootdir) for filename in filenames if fnmatch.fnmatch(filename, pattern)] - return lst + return list(lst) def get_openblas(): @@ -260,10 +260,10 @@ setup(name='spintrum', author_email='samer@afach.de', license='MPL', packages=['spintrum'], + package_data={'spintrum': [lib_file] + recursive_glob("examples")}, install_requires=['numpy', 'mpmath'], python_requires = '>=3.3', include_package_data=True, # enable including files with MANIFEST.in - package_data={'': [lib_file]}, zip_safe=False, cmdclass=dict(build=DependenciesBuilder) ) diff --git a/examples/TimeDependent/MagneticResonance.py b/spintrum/examples/TimeDependent/MagneticResonance.py similarity index 100% rename from examples/TimeDependent/MagneticResonance.py rename to spintrum/examples/TimeDependent/MagneticResonance.py diff --git a/examples/ZULF/acetonitrile.py b/spintrum/examples/ZULF/acetonitrile.py similarity index 100% rename from examples/ZULF/acetonitrile.py rename to spintrum/examples/ZULF/acetonitrile.py diff --git a/examples/ZULF/benzene.py b/spintrum/examples/ZULF/benzene.py similarity index 100% rename from examples/ZULF/benzene.py rename to spintrum/examples/ZULF/benzene.py diff --git a/examples/ZULF/benzene_fit.py b/spintrum/examples/ZULF/benzene_fit.py similarity index 100% rename from examples/ZULF/benzene_fit.py rename to spintrum/examples/ZULF/benzene_fit.py diff --git a/examples/ZULF/ethanol_fit.py b/spintrum/examples/ZULF/ethanol_fit.py similarity index 100% rename from examples/ZULF/ethanol_fit.py rename to spintrum/examples/ZULF/ethanol_fit.py diff --git a/examples/ZULF/formamide.py b/spintrum/examples/ZULF/formamide.py similarity index 100% rename from examples/ZULF/formamide.py rename to spintrum/examples/ZULF/formamide.py diff --git a/examples/ZULF/formicacid_fit.py b/spintrum/examples/ZULF/formicacid_fit.py similarity index 100% rename from examples/ZULF/formicacid_fit.py rename to spintrum/examples/ZULF/formicacid_fit.py diff --git a/examples/ZULF/methylformate.py b/spintrum/examples/ZULF/methylformate.py similarity index 100% rename from examples/ZULF/methylformate.py rename to spintrum/examples/ZULF/methylformate.py diff --git a/examples/ZULF/methylformate_fit.py b/spintrum/examples/ZULF/methylformate_fit.py similarity index 100% rename from examples/ZULF/methylformate_fit.py rename to spintrum/examples/ZULF/methylformate_fit.py diff --git a/examples/ZULF/toluene.py b/spintrum/examples/ZULF/toluene.py similarity index 100% rename from examples/ZULF/toluene.py rename to spintrum/examples/ZULF/toluene.py diff --git a/examples/data/benzeneFitResult.txt b/spintrum/examples/data/benzeneFitResult.txt similarity index 100% rename from examples/data/benzeneFitResult.txt rename to spintrum/examples/data/benzeneFitResult.txt diff --git a/examples/data/benzeneSignal.txt b/spintrum/examples/data/benzeneSignal.txt similarity index 100% rename from examples/data/benzeneSignal.txt rename to spintrum/examples/data/benzeneSignal.txt diff --git a/examples/data/ethanolFitResult.txt b/spintrum/examples/data/ethanolFitResult.txt similarity index 100% rename from examples/data/ethanolFitResult.txt rename to spintrum/examples/data/ethanolFitResult.txt diff --git a/examples/data/ethanolSignal.txt b/spintrum/examples/data/ethanolSignal.txt similarity index 100% rename from examples/data/ethanolSignal.txt rename to spintrum/examples/data/ethanolSignal.txt diff --git a/examples/data/formamideSignal.txt b/spintrum/examples/data/formamideSignal.txt similarity index 100% rename from examples/data/formamideSignal.txt rename to spintrum/examples/data/formamideSignal.txt diff --git a/examples/data/formicacidFitResult.txt b/spintrum/examples/data/formicacidFitResult.txt similarity index 100% rename from examples/data/formicacidFitResult.txt rename to spintrum/examples/data/formicacidFitResult.txt diff --git a/examples/data/formicacidSignal.txt b/spintrum/examples/data/formicacidSignal.txt similarity index 100% rename from examples/data/formicacidSignal.txt rename to spintrum/examples/data/formicacidSignal.txt diff --git a/examples/data/methylformateFitResult.txt b/spintrum/examples/data/methylformateFitResult.txt similarity index 100% rename from examples/data/methylformateFitResult.txt rename to spintrum/examples/data/methylformateFitResult.txt diff --git a/examples/data/methylformateSignal.txt b/spintrum/examples/data/methylformateSignal.txt similarity index 100% rename from examples/data/methylformateSignal.txt rename to spintrum/examples/data/methylformateSignal.txt