Commit 30f29e89 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'mnt/remove_conda' into 'master'

Mnt/remove conda

See merge request fsl/fsleyes/widgets!24
parents e4131bd5 51ffa6b6
#!/usr/bin/env bash
set -e
name=$1
version=$2
# add any extra channels that are needed
for channel in $FSL_CONDA_CHANNELS; do
conda config --append channels $channel
done
# make sure to update fundamental
# packages from the default channel
conda update --yes -c defaults -n base conda
conda install --yes -c defaults -n base setuptools conda-build
# insert project name/version into meta.yaml
echo "{% set name = '$name' %}" > vars.txt
echo "{% set version = '$version' %}" >> vars.txt
cat vars.txt .conda/meta.yaml > tempfile
mv tempfile .conda/meta.yaml
rm vars.txt
mkdir -p dist/conda-bld
conda build --output-folder=dist/conda-bld .conda
# Make sure package is installable
for pyver in 2.7 3.4 3.5 3.6; do
conda create -y --name "test$pyver" python=$pyver
source activate test$pyver
conda install -y -c file://`pwd`/dist/conda-bld $name
source deactivate
done
#!/bin/bash #!/bin/bash
pip install -r requirements-dev.txt
python setup.py doc python setup.py doc
mv doc/html doc/"$CI_COMMIT_REF_NAME" mv doc/html doc/"$CI_COMMIT_REF_NAME"
#!/usr/bin/env bash
set -e
rsync -rv dist/conda-bld/ --exclude 'repodata*' --exclude "*json" "condadeploy:"
ssh condaindex
#!/bin/bash
set -e
apt-get install -y libgconf2-dev
apt-get install -y build-essential \
libgtk2.0-dev \
libwebkitgtk-dev \
libjpeg-dev \
libtiff-dev \
libsdl-dev \
libgstreamer0.10-dev \
libgstreamer-plugins-base0.10-dev \
libnotify-dev \
freeglut3-dev
mkdir $VIRTUAL_ENV/wx-build
pushd $VIRTUAL_ENV/wx-build
wget https://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/wxPython-src-3.0.2.0.tar.bz2
tar xf wxPython-src-3.0.2.0.tar.bz2
cd wxPython-src-3.0.2.0/wxPython
find src -name "*.cpp" | xargs sed -ie 's/PyErr_Format(PyExc_RuntimeError, mesg);/PyErr_Format(PyExc_RuntimeError, "%s", mesg);/g'
find contrib -name "*.cpp" | xargs sed -ie 's/PyErr_Format(PyExc_RuntimeError, mesg);/PyErr_Format(PyExc_RuntimeError, "%s", mesg);/g'
python ./build-wxpython.py \
--install \
--installdir=/ \
--prefix=$VIRTUAL_ENV \
--wxpy_installdir=$VIRTUAL_ENV
export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH
popd
{% set data = load_setup_py_data() %}
package:
name: fsleyes-widgets
version: {{ data['version']}}
build:
noarch: python
script: python setup.py install --single-version-externally-managed --record=record.txt
source:
path: ../
requirements:
build:
- python {{ python }}
- setuptools
{% for package in data.get('setup_requires', {}) %}
- {{ package.lower() }}
{% endfor %}
run:
- python
{% for package in data.get('install_requires', {}) %}
- {{ package.lower() }}
{% endfor %}
about:
license_file: LICENSE
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# #
# 3. doc: Building API documentation # 3. doc: Building API documentation
# #
# 4. build: Building source, wheel and conda distributions # 4. build: Building source and wheel distributions
# #
# 5. deploy: Uploading the build outputs to pypi, and the documentation # 5. deploy: Uploading the build outputs to pypi, and the documentation
# to a hosting server. # to a hosting server.
...@@ -61,23 +61,11 @@ stages: ...@@ -61,23 +61,11 @@ stages:
# - SSH_PRIVATE_KEY_DOC_DEPLOY - private key for rsyncing documentation # - SSH_PRIVATE_KEY_DOC_DEPLOY - private key for rsyncing documentation
# to remote host (DOC_HOST) # to remote host (DOC_HOST)
# #
# - SSH_PRIVATE_KEY_CONDA_DEPLOY - private key for rsyncing conda builds
# to remote host (CONDA_HOST)
#
# - SSH_PRIVATE_KEY_CONDA_INDEX - private key for updating conda channel
# (on CONDA_HOST)
#
# - SSH_SERVER_HOSTKEYS - List of trusted SSH hosts # - SSH_SERVER_HOSTKEYS - List of trusted SSH hosts
# #
# - DOC_HOST: - Username@host to upload documentation to # - DOC_HOST: - Username@host to upload documentation to
# (e.g. "paulmc@jalapeno.fmrib.ox.ac.uk") # (e.g. "paulmc@jalapeno.fmrib.ox.ac.uk")
# #
# - CONDA_HOST: - Username@host to upload conda build to
# (e.g. "paulmc@jalapeno.fmrib.ox.ac.uk")
#
# - CONDA_CHANNELS - List of additional conda channels to
# use for conda build.
#
# - TWINE_USERNAME: - Username to use when uploading to pypi # - TWINE_USERNAME: - Username to use when uploading to pypi
# #
# - TWINE_PASSWORD: - Password to use when uploading to pypi # - TWINE_PASSWORD: - Password to use when uploading to pypi
...@@ -240,25 +228,6 @@ build-pypi-dist: ...@@ -240,25 +228,6 @@ build-pypi-dist:
- dist/* - dist/*
build-conda-dist:
<<: *only_releases
<<: *patch_version
stage: build
image: continuumio/miniconda3
tags:
- docker
script:
- bash ./.ci/build_conda_dist.sh fsleyes-widgets "$CI_COMMIT_REF_NAME"
artifacts:
expire_in: 1 day
paths:
- dist/conda-bld
############## ##############
# Deploy stage # Deploy stage
############## ##############
...@@ -296,19 +265,3 @@ deploy-pypi: ...@@ -296,19 +265,3 @@ deploy-pypi:
script: script:
- bash ./.ci/deploy_pypi.sh - bash ./.ci/deploy_pypi.sh
deploy-conda:
<<: *only_releases
<<: *setup_ssh
stage: deploy
when: manual
image: python:3.5
tags:
- docker
dependencies:
- build-conda-dist
script:
- bash ./.ci/deploy_conda.sh
...@@ -2,6 +2,19 @@ This document contains the ``fsleyes-widgets`` release history in reverse ...@@ -2,6 +2,19 @@ This document contains the ``fsleyes-widgets`` release history in reverse
chronological order. chronological order.
0.6.4 (Friday October 5th 2018)
-------------------------------
Changed
^^^^^^^
* Development (test and documentation dependencies) are no longer listed
in ``setup.py`` - they now need to be installed manually.
* Removed conda build infrastructure.
0.6.3 (Tuesday August 28th 2018) 0.6.3 (Tuesday August 28th 2018)
-------------------------------- --------------------------------
......
...@@ -11,6 +11,8 @@ fsleyes-widgets ...@@ -11,6 +11,8 @@ fsleyes-widgets
.. image:: https://img.shields.io/pypi/v/fsleyes-widgets.svg .. image:: https://img.shields.io/pypi/v/fsleyes-widgets.svg
:target: https://pypi.python.org/pypi/fsleyes-widgets/ :target: https://pypi.python.org/pypi/fsleyes-widgets/
.. image:: https://anaconda.org/conda-forge/fsleyes-widgets/badges/version.svg
:target: https://anaconda.org/conda-forge/fsleyes-widgets
The ``fsleyes-widgets`` package contains a collection of GUI widgets and The ``fsleyes-widgets`` package contains a collection of GUI widgets and
...@@ -19,9 +21,38 @@ used by `fsleyes-props <https://git.fmrib.ox.ac.uk/fsl/fsleyes/props>`_ and ...@@ -19,9 +21,38 @@ used by `fsleyes-props <https://git.fmrib.ox.ac.uk/fsl/fsleyes/props>`_ and
`FSLeyes <https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes>`_, `FSLeyes <https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes>`_,
Installation
------------
You can install ``fsleyes-widgets`` via pip. If you are using Linux, you need
to install wxPython first, as binaries are not available on PyPI. Change the
URL for your specific platform::
pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk2/ubuntu-16.04/ wxpython
Then install ``fsleyes-widgets`` like so::
pip install fsleyes-widgets
``fsleyes-widgets`` is also available on
`conda-forge <https://conda-forge.org/>`_::
conda install -c conda-forge fsleyes-widgets
Dependencies
------------
All of the dependencies of ``fsleyes-widgets`` are listed in the All of the dependencies of ``fsleyes-widgets`` are listed in the
`requirements.txt <requirements.txt>`_ file. `requirements.txt <requirements.txt>`_ file.
Requirements for running tests and building the documentation are listed in the
`requirements-dev.txt <requirements-dev.txt>`_ file.
Documentation Documentation
------------- -------------
...@@ -30,12 +61,26 @@ Documentation ...@@ -30,12 +61,26 @@ Documentation
`sphinx <http://http://sphinx-doc.org/>`_. You can build the API documentation `sphinx <http://http://sphinx-doc.org/>`_. You can build the API documentation
by running:: by running::
pip install -r requirements-dev.txt
python setup.py doc python setup.py doc
The HTML documentation will be generated and saved in the ``doc/html/`` The HTML documentation will be generated and saved in the ``doc/html/``
directory. directory.
Tests
-----
Run the test suite via::
pip install -r requirements-dev.txt
python setup.py test
Many of the tests assume that a display is accessible - if you are running on
a headless machine, you may need to run the tests using ``xvfb-run``.
Contributing Contributing
------------ ------------
......
...@@ -23,10 +23,6 @@ basedir = op.dirname(__file__) ...@@ -23,10 +23,6 @@ basedir = op.dirname(__file__)
with open(op.join(basedir, 'requirements.txt'), 'rt') as f: with open(op.join(basedir, 'requirements.txt'), 'rt') as f:
install_requires = [l.strip() for l in f.readlines()] install_requires = [l.strip() for l in f.readlines()]
# Development/test dependencies are listed in requirements-dev.txt
with open(op.join(basedir, 'requirements-dev.txt'), 'rt') as f:
dev_requires = [l.strip() for l in f.readlines()]
packages = find_packages( packages = find_packages(
exclude=('doc', 'tests', 'dist', 'build', 'fsleyes_widgets.egg-info')) exclude=('doc', 'tests', 'dist', 'build', 'fsleyes_widgets.egg-info'))
...@@ -68,7 +64,7 @@ class doc(Command): ...@@ -68,7 +64,7 @@ class doc(Command):
try: try:
import unittest.mock as mock import unittest.mock as mock
except: except Exception:
import mock import mock
mockobj = mock.MagicMock() mockobj = mock.MagicMock()
...@@ -112,7 +108,6 @@ setup( ...@@ -112,7 +108,6 @@ setup(
packages=packages, packages=packages,
install_requires=install_requires, install_requires=install_requires,
setup_requires=dev_requires,
test_suite='tests', test_suite='tests',
cmdclass={ cmdclass={
......
Supports Markdown
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