Skip to content

Commit

Permalink
Add PyPI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo-bulnes committed Jun 22, 2019
1 parent b2db843 commit 818fc1e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build: clean
python setup.py sdist bdist_wheel

upload_to_test_pypi:
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

upload_to_pypi:
python -m twine upload dist/*

clean:
-rm -r dist/
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<h1 align='center'>Simulated Time</h1>

<p align="center">A testing (and partial) replacement for Python's <code>time</code> package, for fully-controlled time-dependent tests.</p>
<p align="center"><a href="https://pypi.org/project/stime"><img alt="PyPI" src="https://img.shields.io/pypi/v/stime.svg" /></a></p>

<br /><br />

Expand Down Expand Up @@ -72,6 +73,46 @@ class TestTimer(unittest.TestCase):
- ④ Fast-forward when convenient...
- ⑤ or progress one second at a time!

Development
-----------

### Getting started

Optionally, create a virtual environment for this project and activate it.

```bash
python -m venv timer_venv # assuming Python 3
. timer_venv/bin/activate
```

Then do your thing!

```bash
# run the example test suite:
python test_timer.py

# once you're done deactivate the virtual environment if you use one:
deactivate
```

### Release

```bash
# Install the latest setuptools and wheel (in a virtual environment eventually)
pip install --upgrade setuptools wheel

# Update the package version number and tag it:
vim setup.py
git tag -a 'v1.0.0' -m 'Initial release'
git push origin master --tags

# Build the distribution files
make build

# And upload them to PyPI
make upload_to_pypi
```

Credits
-------

Expand Down
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="stime",
version="0.1.2",
author="Gonzalo Bulnes Guilpain",
author_email="[email protected]",
description="A testing (and partial) replacement for the time package, for fully-controlled time-dependent tests.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/gonzalo-bulnes/stime",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
],
)

0 comments on commit 818fc1e

Please sign in to comment.