From: Antonio Jimenez Pastor Date: Tue, 9 Jul 2019 12:03:00 +0000 (+0200) Subject: Updated the .gitignore file with lots of extra excluded files. X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=7e8a24cfbac2b53050d059a35fd4af3a7b9f93e0;p=ajpastor%2Fdiff_defined_functions.git Updated the .gitignore file with lots of extra excluded files. Updated the Makefile including now the commands for distribution and installation of the package. --- diff --git a/.gitignore b/.gitignore index fd20fdd..d858920 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,95 @@ -*.pyc +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +venv/ +ENV/ + +# Spyder project settings +#.spyderproject + +# Rope project settings +#.ropeproject + +/.travis_ci_gh_pages_deploy_key +/.travis_ci_gh_pages_deploy_key.pub +/gh-pages + diff --git a/Makefile b/Makefile index 7f61fe8..08fca30 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,70 @@ SHELL:=/bin/bash -BASE=ajpastor ZIP=diff_defined_functions# ZIP name -VERSION=$(shell cat ./package-version.txt) +VERSION=$(shell cat ./VERSION) -all: - sage -sh sage-pip-install . +# change to your sage command if needed +SAGE = sage + +# Package folder +PACKAGE = sage_sample + +all: install test create: @echo "Creating main directories..." - @mkdir -p ./$(BASE) + @mkdir -p ./$(PACKAGE) @mkdir -p ./releases/old - @echo "from pkgutil import extend_path;" > ./$(BASE)/__init__.py - @echo "__path__ = extend_path(__path__, __name__);" >> ./$(BASE)/__init__.py + @echo "from pkgutil import extend_path;" > ./$(PACKAGE)/__init__.py + @echo "__path__ = extend_path(__path__, __name__);" >> ./$(PACKAGE)/__init__.py -zip: clean_pyc +# Installing commands +install: + $(SAGE) -pip install --upgrade --no-index -v . + +uninstall: + $(SAGE) -pip uninstall $(PACKAGE) + +develop: + $(SAGE) -pip install --upgrade -e . + +test: + $(SAGE) setup.py test + +coverage: + $(SAGE) -coverage $(PACKAGE)/* + +# Documentation commands +doc: + cd docs && $(SAGE) -sh -c "make html" + +doc-pdf: + cd docs && $(SAGE) -sh -c "make latexpdf" + +# Distribution commands + +zip: clean @echo "Compressing the project into file" $(ZIP)".zip"... @rm -f ./releases/$(ZIP)__$(VERSION).zip - @zip -r ./releases/$(ZIP)__$(VERSION).zip $(BASE) type SPKG.txt setup.py package-version.txt Makefile dependencies + @zip -r ./releases/$(ZIP)__$(VERSION).zip $(PACKAGE) type SPKG.txt setup.py package-version.txt Makefile dependencies @cp ./releases/$(ZIP)__$(VERSION).zip ./releases/old/$(ZIP)__$(VERSION)__`date +'%y.%m.%d_%H:%M:%S'`.zip @cp ./releases/$(ZIP)__$(VERSION).zip ./releases/$(ZIP).zip -clean_pyc: - @echo "Cleaning the Python precompiled files (.pyc)" - @find . -name "*.pyc" -exec rm {} + - git: zip @echo "Pushing changes to public git repository" @git add -A @git commit @git push - + +# Cleaning commands +clean: clean_doc clean_pyc + +clean_doc: + @echo "Cleaning documentation" + @cd docs && $(SAGE) -sh -c "make clean" + +clean_pyc: + @echo "Cleaning the Python precompiled files (.pyc)" + @find . -name "*.pyc" -exec rm {} + + +.PHONY: all install develop test coverage clean clean-doc doc doc-pdf