Commit fb398442 authored by Daniel Boeckenhoff's avatar Daniel Boeckenhoff
Browse files

Makefile for publishing and dynamic version, author, email

parent bf3a4633
......@@ -3,6 +3,9 @@ init:
find .git/hooks -type l -exec rm {} \;
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;
test: FORCE
python tfields test
coverage:
coverage run tfields test
coverage report
......@@ -12,17 +15,19 @@ coverage:
clear:
coverage erase
VERSION := $(shell python -c "import sys; import tfields; sys.stdout.write(tfields.__version__)")
publish:
@echo "NOOOTE"
@read root_path
@echo "TEST$$root_path"
@while [ -z "$$VERSION" ]; do \
read -r -p "Please write the version specifier: " VERSION; \
@while [ -z "$$CONTINUE" ]; do \
read -r -p "Have you changed the __version__ attribute in tfields/__init__.py??? If yes, type Y or y to continue. Type anything else to exit. [y/N]: " CONTINUE; \
done ; \
echo $(VERSION)
echo "Publishing pacakge version $(VERSION)"
[ $$CONTINUE = "y" ] || [ $$CONTINUE = "Y" ] || (echo "Exiting."; exit 1;)
@echo "... publishing ..."
@echo "New Version: $(VERSION)"
git tag -a v$(VERSION) -m "Version $(VERSION) tag" # tag version
git push origin v$(VERSION) # explicitly push tag to the shared server
python setup.py sdist
twine upload dist/*
# git tag -a v<my.version.id> -m "<comment to my version>" # tag version
# git push origin v<my.version.id> # explicitly push tag to the shared server
# python setup.py sdist
# twine upload dist/*
FORCE: ;
......@@ -11,19 +11,26 @@ Publishing:
"""
from setuptools import setup, find_packages
import tfields
setup(
name='tfields',
version='0.1.0.dev1',
version=tfields.__version__,
description='numpy + sympy implementation of tensor fields with attached coordinate systems',
author='Daniel Boeckenhoff',
author_email='dboe@ipp.mpg.de',
author=tfields.__author__,
author_email=tfields.__email__,
license='MIT',
packages=find_packages(),
test_require=['doctest'],
test_require=[
'doctest',
'unittest'
],
url='https://gitlab.mpcdf.mpg.de/dboe/tfields',
# install_requires=['numpy', 'scipy'],
install_requires=[
'numpy',
'sympy',
'scipy',
],
entry_points={
'console_scripts': ['tfields = tfields.__main__:runDoctests']
},
......@@ -52,11 +59,11 @@ setup(
'Programming Language :: Python :: 3.6'
],
python_requires='>=2.7',
keywords="tensors coordinate trafo sympy numpy",
keywords="tensors coordinate system trafo sympy numpy",
project_urls={
'Documentation': 'https://packaging.python.org/tutorials/distributing-packages/',
'Documentation': 'https://gitlab.mpcdf.mpg.de/dboe/tfields/',
'Source': 'https://gitlab.mpcdf.mpg.de/dboe/tfields/',
'Tracker': 'https://github.com/pypa/sampleproject/issues',
# 'Tracker': 'https://github.com/pypa/sampleproject/issues',
}
)
......
__version__ = '0.1.1'
__author__ = "Daniel Boeckenhoff"
__email__ = "daniel.boeckenhoff@ipp.mpg.de"
from . import core
from . import bases
from . import lib
......
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