Skip to content

Commit

Permalink
edited setup and setup config for 0.0.0 release. also included
Browse files Browse the repository at this point in the history
distribution instructions.
  • Loading branch information
themantalope committed Nov 18, 2016
1 parent 364e602 commit 8ea41d2
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
65 changes: 65 additions & 0 deletions distribution_instructions.md
@@ -0,0 +1,65 @@
# Instructions for distributing `pyglmnet`

### Prerequisites
Make sure you have the following packages installed locally:
`twine`

Create a file called `.pypirc` **in the project directory root.** This file is
included in the `.gitignore` file, as it contains sensitive info. The file
generally is stuctured like this:

```
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: organization-username
password: organization-password
[pypitest]
repository: https://testpypi.python.org/pypi
username: organization-username
password: organization-password
```

Obviously, make sure you're using the proper passwords and usernames.

### Setup

Update the `setup.py` file as needed with new versions, authors, packages etc.
Then in the root file of the directory, run:
```bash
$ python setup.py sdist bdist_wheel
```
Which will create the standard distribution files.

### Registration and uploading
This is where we will now use `twine` and the custom `.pypirc` file in the root
of the project directory. First, register the package to the `pypitest` server.

```bash
$ twine register -r pypitest --config-file=.pypirc dist/pyglmnet-<verion number>.tar.gz
```

Next, upload.

```bash
$ twine upload -r pypitest --config-file=.pypirc dist/pyglmnet-<version number>.tar.gz
```

To make sure the test worked, head over to the [PyPI test page](https://testpypi.python.org/pypi).
You should see `pyglmnet <version number>` near the top of the list (if you head directly over).

Great, looks like it worked. let's register, upload and release for real!

```bash
$ twine register -r pypi --config-file=.pypirc dist/pyglmnet-<version number>.tar.gz
```
Finally, upload!

```bash
$ twine upload -r pypi --config-file=.pypirc dist/pyglmnet-<version number>.tar.gz
```
3 changes: 2 additions & 1 deletion setup.cfg
Expand Up @@ -10,4 +10,5 @@ exclude = __init__.py
ignore = E241

[metadata]
description-file = README.md
description-file = "README.md"
url = "https://github.com/glm-tools/pyglmnet"
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -10,7 +10,7 @@
MAINTAINER_EMAIL = 'pavan.ramkumar@gmail.com'
LICENSE = 'MIT'
DOWNLOAD_URL = 'https://github.com/glm-tools/pyglmnet.git'
VERSION = '0.1.dev0'
VERSION = '0.0.0'

if __name__ == "__main__":
setup(name=DISTNAME,
Expand Down

0 comments on commit 8ea41d2

Please sign in to comment.