Skip to content

Commit

Permalink
Prepare CIDR Brewer for PyPI distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jul 9, 2016
1 parent 6cdc4dd commit a4f187b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
__pycache__/
*.py[cod]

# Packaging
build/
dist/
*.egg-info/

# Unit test / coverage reports
cover/
htmlcov/
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ CIDR Brewer is a command-line utility which displays information for classless
IP addresses (such as subnet mask and network ID) so you don't need to perform
the calculations yourself.

## Installing

You can install CIDR Brewer via pip (ideally globally):

```
pip install cidr-brewer
```

## Usage

To use, run `./cidrbrewer.py` from the command line with one or two IP
addresses.
To use, run `cidr-brewer` from the command line with one or two IP addresses.

### One IP address

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
34 changes: 34 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python
# coding=utf-8

from setuptools import setup


# Get long description (used on PyPI project page)
def get_long_description():
try:
# Use pandoc to create reStructuredText README if possible
import pypandoc
return pypandoc.convert('README.md', 'rst')
except:
return None


setup(
name='cidr-brewer',
version='1.0.0b1',
description='A CLI utility for working with classless IP addresses',
long_description=get_long_description(),
url='https://github.com/caleb531/cidr-brewer',
author='Caleb Evans',
author_email='caleb@calebevans.me',
license='MIT',
keywords='networking ip addresses cidr',
py_modules=['cidrbrewer'],
install_requires=[],
entry_points={
'console_scripts': [
'cidr-brewer=cidrbrewer:main'
]
}
)

0 comments on commit a4f187b

Please sign in to comment.