Commit 0185d9c8 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'mnt/setup' into 'master'

Mnt/setup

See merge request fsl/fsl_add_module!5
parents 40bdf254 c81a5877
Pipeline #5801 canceled with stages
in 10 seconds
#!/usr/bin/env bash
pip install wheel setuptools twine
python setup.py sdist
python setup.py bdist_wheel
twine check dist/*
# do a test install from both source and wheel
sdist=`find dist -maxdepth 1 -name *.tar.gz`
wheel=`find dist -maxdepth 1 -name *.whl`
for target in $sdist $wheel; do
python -m venv test.venv
. test.venv/bin/activate
pip install --upgrade pip setuptools
pip install $target
deactivate
rm -r test.venv
done
#!/usr/bin/env bash
set -e
pip install -r requirements.txt
pip install -r requirements-dev.txt
......
stages:
- test
- build
test:3.7:
stage: test
......@@ -30,3 +31,13 @@ test:3.9:
script:
- bash ./.ci/unit_tests.sh
build:dist:
stage: build
image: python:3.8
tags:
- docker
script:
- bash ./.ci/build_dist.sh
......@@ -9,5 +9,5 @@
"""
__VERSION__ = '0.1.0'
__version__ = '0.1.0'
"""``fsl_add_module`` version number."""
......@@ -103,7 +103,7 @@ from typing import List, Tuple
import fsl.add_module.ui as ui
import fsl.add_module.routines as routines
import fsl.add_module.plugin_manifest as plgman
from fsl.add_module import __VERSION__
from fsl.add_module import __version__
from fsl.add_module.messages import (info,
important,
warning,
......@@ -156,7 +156,7 @@ def parseArgs(argv : List[str]) -> argparse.Namespace:
description='Download and install FSL modules')
parser.add_argument(
'-V', '--version', action='version', help=helps['version'],
version='%(prog)s {}'.format(__VERSION__))
version='%(prog)s {}'.format(__version__))
parser.add_argument(
'-v', '--verbose', action='store_true', help=helps['verbose'])
parser.add_argument(
......@@ -360,7 +360,7 @@ def main(argv=None):
args = parseArgs(argv)
important(f'fsl_add_module {__VERSION__}. Press CTRL+C '
important(f'fsl_add_module {__version__}. Press CTRL+C '
'at any point to exit.', UNDERLINE, EMPHASIS)
try:
......
#!/usr/bin/env python
import os.path as op
from setuptools import setup, find_packages
basedir = op.dirname(__file__)
with open(op.join(basedir, 'requirements.txt'), 'rt') as f:
install_requires = [line.strip() for line in f.readlines()]
install_requires = [line for line in install_requires if line != '']
version = {}
with open(op.join(basedir, 'fsl', 'add_module', '__init__.py')) as f:
for line in f:
if line.startswith('__version__ = '):
exec(line, version)
break
version = version['__version__']
with open(op.join(basedir, 'README.md'), 'rt') as f:
readme = f.read()
setup(
name='fsl_add_module',
version=version,
description='Script to download and install FSL modules',
long_description=readme,
long_description_content_type='text/markdown',
url='https://git.fmrib.ox.ac.uk/fsl/fsl_add_module',
author='Paul McCarthy',
author_email='paul.mccarthy@ndcn.ox.ac.uk',
license='Apache License Version 2.0',
classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
install_requires=install_requires,
packages=find_packages(),
include_package_data=True,
entry_points={
'console_scripts' : [
'fsl_add_module = fsl.scripts.fsl_add_module:main',
]
}
)
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