Skip to content

Commit

Permalink
Adopt standard extension setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Feb 2, 2022
1 parent 4ef1327 commit e9568f6
Show file tree
Hide file tree
Showing 12 changed files with 2,456 additions and 116 deletions.
17 changes: 17 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "2"
checks:
file-lines:
config:
threshold: 500
plugins:
bandit:
enabled: true
checks:
assert_used:
enabled: false
exclude_patterns:
- "_datalad_buildsupport/"
- "versioneer.py"
- "*/_version.py"
- "tools/"
- "**/tests/"
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
datalad_container/_version.py export-subst
Empty file added .noannex
Empty file.
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include formatters.py setup_support.py
include CONTRIBUTORS LICENSE versioneer.py
graft _datalad_buildsupport
graft docs
prune docs/build
global-exclude *.py[cod]
50 changes: 12 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,47 +1,21 @@
# simple makefile to simplify repetetive build env management tasks under posix
# Ideas borrowed from scikit-learn's and PyMVPA Makefiles -- thanks!

PYTHON ?= python
NOSETESTS ?= nosetests

MODULE ?= datalad

all: clean test

clean:
$(PYTHON) setup.py clean
rm -rf dist build bin docs/build docs/source/generated
rm -rf dist build bin docs/build docs/source/generated *.egg-info
-find . -name '*.pyc' -delete
-find . -name '__pycache__' -type d -delete

bin:
mkdir -p $@
PYTHONPATH=bin:$(PYTHONPATH) python setup.py develop --install-dir $@

test-code: bin
PATH=bin:$(PATH) PYTHONPATH=bin:$(PYTHONPATH) $(NOSETESTS) -s -v $(MODULE)

test-coverage:
rm -rf coverage .coverage
$(NOSETESTS) -s -v --with-coverage $(MODULE)

test: test-code


trailing-spaces:
find $(MODULE) -name "*.py" -exec perl -pi -e 's/[ \t]*$$//' {} \;

code-analysis:
flake8 $(MODULE) | grep -v __init__ | grep -v external
pylint -E -i y $(MODULE)/ # -d E1103,E0611,E1101

update-changelog:
@echo ".. This file is auto-converted from CHANGELOG.md (make update-changelog) -- do not edit\n\nChange log\n**********" > docs/source/changelog.rst
pandoc -t rst CHANGELOG.md >> docs/source/changelog.rst

release-pypi: update-changelog
# better safe than sorry
release-pypi:
# avoid upload of stale builds
test ! -e dist
python setup.py sdist
python setup.py bdist_wheel --universal
$(PYTHON) setup.py sdist bdist_wheel
twine upload dist/*

update-buildsupport:
git subtree pull \
-m "Update DataLad build helper" \
--squash \
--prefix _datalad_buildsupport \
https://github.com/datalad/datalad-buildsupport.git \
master
Loading

0 comments on commit e9568f6

Please sign in to comment.