Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
pip install -U pip
pip install -r /tmp/src/templateflow/requirements.txt
pip install "datalad ~= 0.11.8" doi2bib
pip install "setuptools>=27.0" twine codecov
pip install "setuptools>=42.0" "setuptools_scm[toml] >= 3.4" twine codecov

- run:
name: Install git and git-annex
Expand Down Expand Up @@ -166,10 +166,14 @@ jobs:
command: apt update && apt -y install graphviz
- run:
name: Install deps
command: pip install --no-cache-dir -r docs/requirements.txt
command: |
pip install --no-cache-dir "setuptools>=42.0" "setuptools_scm[toml]>=3.4"
pip install --no-cache-dir -r docs/requirements.txt
- run:
name: Build only this commit
command: make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" html
command: |
python setup.py --version
make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" html
- store_artifacts:
path: ./docs/_build/no_version_html
- run:
Expand Down Expand Up @@ -215,7 +219,7 @@ jobs:
name: Deploy to PyPi
command: |
source /tmp/venv/bin/activate
pip install "setuptools>=27.0" twine
pip install "setuptools>=42.0" "setuptools_scm[toml] >= 3.4" twine
python setup.py sdist
twine check dist/*
twine upload dist/*
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# setuptools_scm
templateflow/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
18 changes: 6 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,26 @@ env:
global:
- CHECK_TYPE="install"
- INSTALL_TYPE="pip"
- INSTALL_DEPENDS="pip setuptools"
- PIP="pip"
matrix:
- CHECK_TYPE="style"
- INSTALL_TYPE="install"
- INSTALL_TYPE="develop"
- INSTALL_TYPE="sdist"
- INSTALL_TYPE="wheel"
- INSTALL_DEPENDS="pip==18.1 setuptools==30.2.1"
- INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
- PIP="pip==18.1"
- PIP="pip==10.0.1"

matrix:
exclude:
- python: 3.7
env: CHECK_TYPE="style"
- python: 3.8
env: CHECK_TYPE="style"
allow_failures:
- python: 3.6
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
- python: 3.7
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"
- python: 3.8
env: INSTALL_DEPENDS="pip==10.0.1 setuptools==30.3.0"

before_install:
- python -m pip install --upgrade $INSTALL_DEPENDS
- python -m pip install -U $PIP
- python -m pip install -U "setuptools>=42.0" "setuptools_scm[toml]>=3.4"
- pip install -U flake8

install:
Expand Down Expand Up @@ -69,7 +63,7 @@ script:
if [ "$CHECK_TYPE" == "style" ]; then
flake8 templateflow
elif [ "$CHECK_TYPE" == "install" ]; then
INTENDED_VERSION="$(python -c 'import versioneer; print(versioneer.get_version())')"
INTENDED_VERSION="$(python setup.py --version)"
mkdir for_testing
cd for_testing
INSTALLED_VERSION="$(python -c 'import templateflow; print(templateflow.__version__)')"
Expand Down
16 changes: 0 additions & 16 deletions get_version.py

This file was deleted.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[build-system]
requires = ["setuptools >= 30.3.0", "wheel"]
requires = ["setuptools >= 42.0", "wheel", "setuptools_scm[toml] >= 3.4"]

[tool.setuptools_scm]
write_to = "templateflow/_version.py"
write_to_template = """\
\"\"\"Version file, automatically generated by setuptools_scm.\"\"\"
__version__ = "{version}"
"""
fallback_version = "0.0"
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ classifiers =

[options]
python_requires = >= 3.6
setup_requires =
setuptools >= 42.0
setuptools_scm >= 3.4
toml
install_requires =
pybids >= 0.9.2
requests
Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/usr/bin/env python
""" templateflow setup script """
"""Templateflow's setup script."""
import sys
from setuptools import setup
import versioneer
from setuptools.command.install import install
from setuptools.command.develop import develop

# Give setuptools a hint to complain if it's too old a version
# 30.3.0 allows us to put most metadata in setup.cfg
# Should match pyproject.toml
SETUP_REQUIRES = ["setuptools >= 30.3.0"]
SETUP_REQUIRES = ["setuptools >= 42.0", "setuptools_scm >= 3.4", "toml"]
# This enables setuptools to install wheel on-the-fly
SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else []

Expand Down Expand Up @@ -42,9 +41,6 @@ class CheckHomeProdCommand(install):
""" Install entry-point """
setup(
name="templateflow",
version=versioneer.get_version(),
setup_requires=SETUP_REQUIRES,
cmdclass=versioneer.get_cmdclass(
cmdclass={"develop": CheckHomeDevCommand, "install": CheckHomeProdCommand,}
),
cmdclass={"develop": CheckHomeDevCommand, "install": CheckHomeProdCommand},
)
19 changes: 0 additions & 19 deletions templateflow/__about__.py

This file was deleted.

19 changes: 11 additions & 8 deletions templateflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""TemplateFlow is the Zone of Templates."""
from .__about__ import __version__, __copyright__, __credits__

__packagename__ = "templateflow"
__all__ = [
"__copyright__",
"__credits__",
"__packagename__",
"__version__",
]
__copyright__ = "2020, The TemplateFlow developers"
try:
from ._version import __version__
except ModuleNotFoundError:
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__packagename__).version
except DistributionNotFound:
__version__ = "unknown"
del get_distribution
del DistributionNotFound
Loading