Commit 4dfb95cd authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

Merge branch '30-pip-installation' into 'master'

Resolve "pip installation"

Closes #30

See merge request bis-aria/ariaec!9
parents 119b70d2 6194b150
......@@ -18,8 +18,6 @@ build:
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" registry-gitlab.pasteur.fr
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME" .
- docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME"
only:
- master
pytest:
image: registry-gitlab.pasteur.fr/bis-aria/ariaec:$CI_BUILD_REF_NAME
......
......@@ -2,18 +2,18 @@ FROM centos:centos7
MAINTAINER Fabrice Allain <fabrice.allain@pasteur.fr>
RUN yum install -y epel-release
RUN yum install -y python2-pip python-devel gcc make git
RUN yum install -y python2-pip python-devel gcc gcc-c++ make git
RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -; yum -y install nodejs
RUN npm install -g --save-dev @commitlint/{cli,config-conventional}; npm install -g conventional-changelog-cli
RUN echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
RUN pip install --upgrade pip ; pip install --upgrade setuptools; pip install sphinx; pip install numpy; pip install matplotlib; pip install coverage; pip install pytest; pip install pytest-cov
RUN pip install --upgrade pip ; pip install --upgrade setuptools; pip install coverage; pip install pytest; pip install pytest-cov
RUN wget http://www2.ccpn.ac.uk/download/ccpnmr/analysis2.4.2.tar.gz; tar xvzf analysis2.4.2.tar.gz; export CCPNMR_TOP_DIR=$(pwd)/ccpnmr; export PYTHONPATH=${PYTHONPATH}:$CCPNMR_TOP_DIR/ccpnmr2.4/python
RUN mkdir build-aria
ADD aria /build-aria/aria
RUN mkdir build-aria && mkdir build-aria/src
ADD src/aria /build-aria/src/aria
ADD *.py PKG-INFO /build-aria/
RUN cd build-aria && pip install .; npm install --save-dev husky
RUN npx yarn add husky --dev
graft aria
graft src
graft docs
include *.md
include COPYRIGHT
......
#!/usr/bin/env bash
$PYTHON -m pip install --no-deps .
{% set data = load_setup_py_data() %}
package:
name: ariaec
version: {{ data['version'] }}
source:
path: ..
build:
# If the installation is complex, or different between Unix and Windows, use
# separate bld.bat and build.sh files instead of this key. Add the line
# "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or
# "skip: True # [not win]" to limit to Windows.
# script: python setup.py install --single-version-externally-managed --record=record.txt
# number: {{ environ.get('CI_PIPELINE_ID', 0) }}
requirements:
build:
- python
- setuptools
run:
- python
- # dependencies are defined in setup.py
{% for dep in data['install_requires'] %}
- {{ dep.lower() }}
{% endfor %}
test:
requires:
- bandit
- pylint
- pytest
- pytest-cov
imports:
- ariaec
about:
summary: "de Novo Ambiguous Restraints for Iterative Assignment"
home: https://gitlab.pasteur.fr/bis-aria/ariaec
# license: Proprietary
extra:
sphinx:
language: en
intersphinx:
# project: Parent URL of the "objects.inv" file
......@@ -206,10 +206,14 @@ def setup_package():
setup_requires=[
# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0',
'cython',
'cython>=0.16',
'numpy>=1.10.4',
'biopython==1.73',
'scipy<1.3.0',
'matplotlib<3.0',
'numpy',
'pytest-runner'
'pytest-runner',
'networkx==2.2',
'MDAnalysis'
],
tests_requires=['pytest', 'pytest-cov'],
# Project uses reStructuredText, so ensure that the docutils get
......@@ -228,8 +232,6 @@ def setup_package():
# 'sphinxcontrib-napoleon',
'configparser',
'mako',
'biopython>=1.69',
'scipy>= 0.9',
'pandas',
'seaborn',
'sklearn',
......@@ -257,8 +259,8 @@ def setup_package():
},
# bin folder is normally for non python code that could be executed
# directly on terminal (bash scripts, ...)
scripts=['aria/aria2.py',
'aria/check.py'],
scripts=['src/aria/aria2.py',
'src/aria/check.py'],
# Force setuptools to unzip in order to access data files with pkgutil
# since pkg_resources don't like relative paths in zipped egg dir :/
# TODO: solution to enable zip_safe
......@@ -271,7 +273,9 @@ def setup_package():
# to respect pep recommandations. Non data files can be includes outside
# the package with data_files key (non data files are not accessible by
# the package after the installation)
# package_dir={
package_dir={
'': 'src'
},
# '': 'src/py',
# 'aria': 'src/py/aria',
# 'aria.cns': 'cns',
......@@ -284,7 +288,9 @@ def setup_package():
# 'aria.src.xml': 'src/xml',
# 'aria.src.csh': 'src/csh'},
packages=find_packages(exclude=("examples*",)),
packages=find_packages("src", exclude=("docs*",)),
# Line below works for Python 3 only
# packages=find_namespace_packages(where='src'),
# Install any data files found in the package
include_package_data=True,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment