Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Tools for making a Pypi release #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ build
dist
README.html
nostril.egg-info
casics_nostril.egg-info
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
install-release-tools:
pip install --user twine

release-pypi-test:
python setup.py sdist
python setup.py bdist_wheel --universal
twine check dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

release-pypi:
python setup.py sdist
python setup.py bdist_wheel --universal
twine check dist/*
twine upload dist/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Please also use the DOI to indicate the specific version you use, to improve oth

The following is probably the simplest and most direct way to install Nostril on your computer:
```
sudo pip3 install git+https://github.com/casics/nostril.git
sudo pip3 install casics-nostril
```

Alternatively, you can clone this repository and then run `setup.py`:
Expand Down
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
with open(path.join(here, 'requirements.txt')) as f:
reqs = f.read().rstrip().splitlines()

with open("README.md") as f:
readme_markdown = f.read()

# The following reads the variables without doing an "import nostril",
# because the latter will cause the python execution environment to fail if
# any dependencies are not already installed -- negating most of the reason
Expand All @@ -33,9 +36,15 @@
# Finally, define our namesake.

setup(
name = version['__title__'].lower(),
# We use an alternative name (casics-nostril) on PyPi,
# as nostril is already used by https://pypi.org/project/nostril/
# Users will have to use pip install casics-nostril,
# but it won't change the installed package name (nostril),
# which is defined in the packages property.
name = "casics-{}".format(version['__title__'].lower()),
description = version['__description__'],
long_description = 'Nostril (Nonsense String Evaluator) implements a heuristic mechanism to infer whether a given word or text string is likely to be meaningful or nonsense.',
long_description = readme_markdown,
long_description_content_type="text/markdown",
version = version['__version__'],
url = version['__url__'],
author = version['__author__'],
Expand Down