Skip to content
Snippets Groups Projects
Commit fe8c002c authored by Denis Arrivault's avatar Denis Arrivault
Browse files

Adding gitlab-ci + cleaning Dockerfiles + applying debian patches

parent 31dd832a
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,10 @@ ltfatpy.egg-info/ ...@@ -65,6 +65,10 @@ ltfatpy.egg-info/
.project .project
.pydevproject .pydevproject
# PyCharm #
###########
.idea
# Ipython files # # Ipython files #
################# #################
...@@ -84,8 +88,9 @@ pytests_results.txt ...@@ -84,8 +88,9 @@ pytests_results.txt
.coverage .coverage
.html .html
.png .png
htmlcov/ .eggs
LtfatPyt.egg-info/ LtfatPyt.egg-info/
.cache/ .cache/
dist/ dist/
MANIFEST MANIFEST
# CI Config for ltaftpy / gitlab
# nosetests template
.nose: &nose
script:
- pip3 install -e .
- nosetests3
artifacts:
paths:
- build
expire_in: 8d
# doc template
.doc: &doc
script:
- pip3 install -e .
- python3 setup.py build_sphinx
- cp -r build/sphinx/html public
artifacts:
paths:
- public
# Tests on X86_64 ubuntu
unbutu:X86_64:
<<: *nose
image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:X86_64
tags:
- docker
# Tests on i686 ubuntu
ubuntu:i686:
<<: *nose
image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:i686
tags:
- docker
# Doc Generation
pages:
<<: *doc
image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:X86_64
tags:
- docker
only:
- master
...@@ -3,7 +3,7 @@ recursive-include ltfatpy/comp *.c *.pyx ...@@ -3,7 +3,7 @@ recursive-include ltfatpy/comp *.c *.pyx
recursive-include doc *.rst *.py *.png *.bib recursive-include doc *.rst *.py *.png *.bib
prune ltfat_C_kernel/tests prune ltfat_C_kernel/tests
prune ltfat_C_kernel/lib prune ltfat_C_kernel/lib
prune ltfatpy/tests #prune ltfatpy/tests
graft cmake-modules graft cmake-modules
include *.txt include *.txt
include *.rst include *.rst
......
...@@ -44,7 +44,7 @@ extensions = [ ...@@ -44,7 +44,7 @@ extensions = [
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'sphinx.ext.todo', 'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.pngmath', 'sphinx.ext.imgmath',
'sphinx.ext.ifconfig', 'sphinx.ext.ifconfig',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'sphinxcontrib.bibtex' 'sphinxcontrib.bibtex'
......
FROM debian:jessie
MAINTAINER Denis Arrivault
WORKDIR /
RUN apt-get update && apt-get install -y \
cmake \
libfftw3-dev \
liblapack-dev \
python \
python-dev \
python-pip \
python-matplotlib \
gfortran
RUN pip install scipy coverage Sphinx sphinxcontrib-bibtex
ADD ltfatpy-1.0.0.tar.gz /
RUN pip install ltfatpy-1.0.0/ && pip uninstall ltfatpy
RUN cd ltfatpy-1.0.0/ && python setup.py build_sphinx
FROM ubuntu:latest
MAINTAINER Denis Arrivault
WORKDIR /
RUN apt-get update && apt-get install -y \
cmake \
libfftw3-dev \
liblapack-dev \
python3 \
python3-dev \
python3-pip \
python3-tk \
python3-matplotlib
RUN pip3 install --upgrade pip
RUN pip3 install scipy nose coverage pytest pytest-cov Sphinx sphinxcontrib-bibtex
# Copy the ltfatpy sdist in the docker directory and uncomment the following line
# if you want to include ltfatpy sources in the docker image :
# ADD ltfatpy-1.0.8.tar.gz /
# cleanup
RUN apt-get -qy autoremove
\ No newline at end of file
FROM debian:jessie
MAINTAINER Denis Arrivault
WORKDIR /
RUN apt-get update && apt-get install -y \
cmake \
libfftw3-dev \
liblapack-dev \
python \
python-pip \
cython \
python-matplotlib \
gfortran
RUN pip install scipy coverage
ADD ltfatpy-1.0.0.tar.gz /
RUN pip install ltfatpy-1.0.0/
\ No newline at end of file
FROM ubuntu:latest
MAINTAINER Denis Arrivault
WORKDIR /
RUN apt-get update && apt-get install -y \
cmake \
libfftw3-dev \
liblapack-dev \
python3 \
python3-dev \
python3-pip \
cython \
python3-tk \
python3-matplotlib
RUN pip3 install --upgrade pip
RUN pip3 install scipy nose coverage pytest pytest-cov Sphinx sphinxcontrib-bibtex
# Copy the ltfatpy sdist in the docker directory and uncomment the following line
# if you want to include ltfatpy sources in the docker image :
# ADD ltfatpy-1.0.8.tar.gz /
# cleanup
RUN apt-get -qy autoremove
\ No newline at end of file
FROM ioft/i386-ubuntu
MAINTAINER Denis Arrivault
WORKDIR /
RUN apt-get update && apt-get install -y \
cmake \
libfftw3-dev \
liblapack-dev \
python3 \
python3-dev \
python3-pip \
python3-tk \
python3-matplotlib
RUN pip3 install --upgrade pip
RUN pip3 install scipy nose coverage pytest pytest-cov Sphinx sphinxcontrib-bibtex
# Copy the ltfatpy sdist in the docker directory and uncomment the following line
# if you want to include ltfatpy sources in the docker image :
# ADD ltfatpy-1.0.8.tar.gz /
# cleanup
RUN apt-get -qy autoremove
\ No newline at end of file
[nosetests] [nosetests]
#verbosity=1 #verbosity=1
where=./ltfatpy where=./ltfatpy
with-xunit=1
xunit-file=./build/nosetests.xml
with-coverage=1 with-coverage=1
cover-package=ltfatpy cover-package=ltfatpy
cover-erase=1 cover-erase=1
cover-html=1 cover-html=1
cover-html-dir=../htmlcov cover-html-dir=../build/htmlcov
[pytest] [pytest]
# Specifies a minimal pytest version required for running tests. # Specifies a minimal pytest version required for running tests.
...@@ -19,4 +21,5 @@ norecursedirs = .git bin build cmake-modules ltfat_C_kernel sandboxes .settings ...@@ -19,4 +21,5 @@ norecursedirs = .git bin build cmake-modules ltfat_C_kernel sandboxes .settings
source=./ltfatpy source=./ltfatpy
omit = ./ltfatpy/tests/* omit = ./ltfatpy/tests/*
[coverage html] [coverage html]
directory=../htmlcov directory=../build/htmlcov
\ No newline at end of file
...@@ -66,14 +66,9 @@ import distutils.spawn as ds ...@@ -66,14 +66,9 @@ import distutils.spawn as ds
import distutils.dir_util as dd import distutils.dir_util as dd
# Always prefer setuptools over distutils # Always prefer setuptools over distutils
try: from setuptools import setup, find_packages, Extension
from setuptools import setup, Extension from distutils.command.clean import clean
from setuptools.command.clean import clean from distutils.command.sdist import sdist
from setuptools.command.sdist import sdist
except ImportError:
from distutils.core import setup, Extension
from distutils.command.clean import clean
from distutils.command.sdist import sdist
# Test if Cython is installed # Test if Cython is installed
USE_CYTHON = True USE_CYTHON = True
...@@ -134,7 +129,7 @@ def run_cmake(root_dir): ...@@ -134,7 +129,7 @@ def run_cmake(root_dir):
except ds.DistutilsExecError: except ds.DistutilsExecError:
print("Error while running cmake") print("Error while running cmake")
print("run 'setup.py build --help' for build options") print("run 'setup.py build --help' for build options")
print("You may also try editing the settings in CMakeLists.txt file " + print("You may also try editing the settings in CMakeLists.txt file " +
"and re-running setup") "and re-running setup")
sys.exit(-1) sys.exit(-1)
...@@ -152,7 +147,7 @@ def run_make(root_dir): ...@@ -152,7 +147,7 @@ def run_make(root_dir):
except ds.DistutilsExecError: except ds.DistutilsExecError:
print("Error while running make") print("Error while running make")
print("run 'setup.py build --help' for build options") print("run 'setup.py build --help' for build options")
print("You may also try editing the settings in CMakeLists.txt file " + print("You may also try editing the settings in CMakeLists.txt file " +
"and re-running setup") "and re-running setup")
sys.exit(-1) sys.exit(-1)
...@@ -171,7 +166,7 @@ def run_make_install(root_dir): ...@@ -171,7 +166,7 @@ def run_make_install(root_dir):
except ds.DistutilsExecError: except ds.DistutilsExecError:
print("Error while running make install") print("Error while running make install")
print("run 'setup.py build --help' for build options") print("run 'setup.py build --help' for build options")
print("You may also try editing the settings in CMakeLists.txt file " + print("You may also try editing the settings in CMakeLists.txt file " +
"and re-running setup") "and re-running setup")
sys.exit(-1) sys.exit(-1)
...@@ -189,7 +184,7 @@ def run_uninstall(root_dir): ...@@ -189,7 +184,7 @@ def run_uninstall(root_dir):
except ds.DistutilsExecError: except ds.DistutilsExecError:
print("Error while running make uninstall") print("Error while running make uninstall")
print("run 'setup.py build --help' for build options") print("run 'setup.py build --help' for build options")
print("You may also try editing the settings in CMakeLists.txt file " + print("You may also try editing the settings in CMakeLists.txt file " +
"and re-running setup") "and re-running setup")
sys.exit(-1) sys.exit(-1)
...@@ -214,7 +209,8 @@ class m_build_ext(build_ext): ...@@ -214,7 +209,8 @@ class m_build_ext(build_ext):
########################## ##########################
def read(*paths): def read(*paths):
"""Build a file path from *paths* and return the contents.""" """Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f: from io import open
with open(os.path.join(*paths), 'r', encoding='utf-8') as f:
return f.read() return f.read()
...@@ -317,22 +313,21 @@ def setup_package(): ...@@ -317,22 +313,21 @@ def setup_package():
setup(name="ltfatpy", setup(name="ltfatpy",
version=VERSION, version=VERSION,
description='The Large Time-Frequency Toolbox (LTFAT) in Python', description='The Large Time-Frequency Toolbox (LTFAT) in Python',
long_description=(read('README.rst') + '\n\n' + long_description=(read('README.rst') + '\n\n' +
read('HISTORY.rst') + '\n\n' + read('HISTORY.rst') + '\n\n' +
read('AUTHORS.rst')), read('AUTHORS.rst')),
packages=["ltfatpy", "ltfatpy.comp", "ltfatpy.fourier", packages=find_packages(),
"ltfatpy.gabor", "ltfatpy.signals", "ltfatpy.sigproc",
"ltfatpy.tools"],
package_data={'ltfatpy.signals': ['*.wav'], package_data={'ltfatpy.signals': ['*.wav'],
'ltfatpy.comp': ['*.pxd']}, 'ltfatpy.comp': ['*.pxd'],
'ltfatpy.tests.datasets': ['*.mat']},
url="https://gitlab.lif.univ-mrs.fr/dev/ltfatpy", url="https://gitlab.lif.univ-mrs.fr/dev/ltfatpy",
license='GNU GPL V3', license='GNU GPL V3',
author='Denis Arrivault and Florent Jaillet', author='Denis Arrivault and Florent Jaillet',
author_email='denis.arrivault@lif.univ-mrs.fr ' + author_email='denis.arrivault@lif.univ-mrs.fr ' +
'florent.jaillet@lif.univ-mrs.fr', 'florent.jaillet@lif.univ-mrs.fr',
# install_requires=['numpy'],
ext_modules=extensions, ext_modules=extensions,
tests_require=['pytest'], test_suite='nose.collector',
tests_require=['nose', 'coverage'],
cmdclass={'build_ext': m_build_ext, cmdclass={'build_ext': m_build_ext,
'clean': m_clean, 'sdist': m_sdist}, 'clean': m_clean, 'sdist': m_sdist},
classifiers=['Development Status :: 5 - Production/Stable', classifiers=['Development Status :: 5 - Production/Stable',
...@@ -349,7 +344,7 @@ def setup_package(): ...@@ -349,7 +344,7 @@ def setup_package():
'Topic :: Scientific/Engineering :: Mathematics', 'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering' 'Topic :: Scientific/Engineering'
], ],
install_requires=['numpy>=1.8', 'matplotlib>=1.4', 'six>=1.10'], install_requires=['scipy>=0.18', 'numpy>=1.8', 'matplotlib>=1.4', 'six>=1.10'],
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment