forked from apenwarr/redo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup.py: add a python setuptools package.
To build a package suitable for python's pip tool: python setup.py sdist To install a pre-built package from pypi: pip install redo-tools
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include *.md | ||
include LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import os, setuptools, subprocess | ||
|
||
# Construct the redo input files, including redo.version, if we're | ||
# starting from the original redo source dir. If we're running | ||
# from the python pip package, the files already exist, so we | ||
# skip this step. | ||
mydir = os.path.dirname(__file__) | ||
script = os.path.join(mydir, 'do') | ||
verfile = os.path.join(mydir, 'redo/version/_version.py') | ||
if os.path.exists(script) and not os.path.exists(verfile): | ||
subprocess.check_call([script]) | ||
|
||
|
||
import redo.version | ||
|
||
|
||
def read(fname): | ||
return open(os.path.join(mydir, fname)).read() | ||
|
||
|
||
# FIXME: we probably need to build redo/sh on the target system, somehow. | ||
setuptools.setup( | ||
name = 'redo-tools', | ||
version = redo.version.TAG.replace('-', '+', 1), | ||
python_requires='>=2.7, <3.0', | ||
author = 'Avery Pennarun', | ||
author_email = '[email protected]', | ||
description = ('djb redo: a recursive, general purpose build system.'), | ||
long_description=read('README.md'), | ||
long_description_content_type='text/markdown', | ||
license = 'Apache', | ||
keywords = 'redo redo-ifchange make dependencies build system compiler', | ||
url = 'https://github.com/apenwarr/redo', | ||
packages = setuptools.find_packages(), | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
'Environment :: Console', | ||
'Topic :: Utilities', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Operating System :: POSIX', | ||
'Topic :: Software Development :: Build Tools', | ||
'Topic :: Utilities', | ||
], | ||
entry_points = { | ||
'console_scripts': [ | ||
'redo=redo.cmd_redo:main', | ||
'redo-always=redo.cmd_always:main', | ||
'redo-ifchange=redo.cmd_ifchange:main', | ||
'redo-ifcreate=redo.cmd_ifcreate:main', | ||
'redo-log=redo.cmd_log:main', | ||
'redo-ood=redo.cmd_ood:main', | ||
'redo-sources=redo.cmd_sources:main', | ||
'redo-stamp=redo.cmd_stamp:main', | ||
'redo-targets=redo.cmd_targets:main', | ||
'redo-unlocked=redo.cmd_unlocked:main', | ||
'redo-whichdo=redo.cmd_whichdo:main', | ||
], | ||
}, | ||
) |