Skip to content

Commit

Permalink
[Utils] Script to clean installation files; docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed May 3, 2019
1 parent 44c1490 commit b156cc5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# This script removes temporary files from the installation.

set -e

thisDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
mainDir="${thisDir}/.."

/bin/rm -rf "${mainDir}/dist"
/bin/rm -rf "${mainDir}/build"
/bin/rm -rf "${mainDir}/ankipandas.egg-info"
6 changes: 6 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# This script is used to push a new release to pypy and add an appropriate
# tag to the git repository.

set -e

# Upload to pypi
Expand Down Expand Up @@ -32,3 +35,6 @@ python3 setup.py sdist bdist_wheel
python3 -m twine upload --verbose --repository-url https://upload.pypi.org/legacy/ dist/*
git tag -a "v${version}" -m "Release version ${version}"
git push origin "v${version}"

# Cleanup
bash "${thisDir}/clean.sh"
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/env python3

""" To install this package, change to the directory of this file and run
pip3 install --user .
(the ``--user`` flag installs the package for your user account only, otherwise
you will need administrator rights).
"""

# std
from distutils.core import setup
# noinspection PyUnresolvedReferences
Expand Down

0 comments on commit b156cc5

Please sign in to comment.