Skip to content

Commit

Permalink
pypi distribution setup. how did I never commit this before now?
Browse files Browse the repository at this point in the history
  • Loading branch information
dryan committed Jan 18, 2018
1 parent 7093ff7 commit c62390e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dist
build
eggs
parts
bin
var
sdist
develop-eggs
Expand Down
5 changes: 5 additions & 0 deletions bin/d3ploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /usr/bin/env python2

import d3ploy

d3ploy.main()
2 changes: 1 addition & 1 deletion d3ploy/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from d3ploy import main
from d3ploy import main
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
29 changes: 29 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import re
from distutils.core import setup

VERSION_FINDER = re.compile(
r'^VERSION = \'([\d+]\.[\d+].[\d+])\'$',
re.MULTILINE
)

script = open('d3ploy/d3ploy.py', 'r').read()

VERSION = VERSION_FINDER.findall(script)

if VERSION:
VERSION = VERSION.pop()
else:
raise ValueError('Could not find version number in script file')

setup(
name='d3ploy',
packages=['d3ploy'],
version=VERSION,
description='Script for uploading files to S3 with multiple environment support.',
author='Dan Ryan',
author_email='d@dryan.com',
url='https://github.com/dryan/d3ploy',
download_url='https://github.com/dryan/d3ploy/archive/{}.tar.gz'.format(
VERSION),
scripts=['bin/d3ploy'],
)

0 comments on commit c62390e

Please sign in to comment.