-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# rever | ||
rever | ||
===== | ||
Release Versions of Software |
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,5 @@ | ||
import xonsh.imphooks | ||
|
||
|
||
xonsh.imphooks.install_import_hooks() | ||
__version__ = '0.0.0' |
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,3 @@ | ||
from rever.main import main | ||
|
||
main() |
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,5 @@ | ||
"""Main CLI entry point for rever""" | ||
|
||
def main(args=None): | ||
"""Main function for rever.""" | ||
echo "hello" |
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,3 @@ | ||
#!/usr/bin/env python3 -u | ||
from rever.main import main | ||
main() |
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,60 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
import ast | ||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
|
||
def find_version(filename): | ||
with open(filename) as f: | ||
initlines = f.readlines() | ||
version_line = None | ||
for line in initlines: | ||
if line.startswith('__version__'): | ||
vstr = line.strip().split()[-1] | ||
ver = ast.literal_eval(vstr) | ||
break | ||
return ver | ||
|
||
|
||
def main(): | ||
"""The main entry point.""" | ||
if sys.version_info[:2] < (3, 4): | ||
sys.exit('xonsh currently requires Python 3.4+') | ||
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'r') as f: | ||
readme = f.read() | ||
scripts = ['scripts/rever'] | ||
skw = dict( | ||
name='rever', | ||
description='Release Versions of Software', | ||
long_description=readme, | ||
license='BSD', | ||
version=find_version('rever/__init__.py'), | ||
author='Anthony Scopatz', | ||
maintainer='Anthony Scopatz', | ||
author_email='scopatz@gmail.com', | ||
url='https://github.com/scopatz/rever', | ||
platforms='Cross Platform', | ||
classifiers=['Programming Language :: Python :: 3'], | ||
packages=['rever'], | ||
package_dir={'rever': 'rever'}, | ||
package_data={'rever': ['*.xsh']}, | ||
scripts=scripts, | ||
) | ||
# WARNING!!! Do not use setuptools 'console_scripts' | ||
# It validates the depenendcies (of which we have none) everytime the | ||
# 'rever' command is run. This validation adds ~0.2 sec. to the startup | ||
# time of xonsh - for every single xonsh run. This prevents us from | ||
# reaching the goal of a startup time of < 0.1 sec. So never ever write | ||
# the following: | ||
# | ||
# 'console_scripts': ['rever = rever.main:main'], | ||
# | ||
# END WARNING | ||
setup(**skw) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |