-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grab version from git tags and read requirements from file
- Loading branch information
1 parent
c6bf28b
commit cfc2060
Showing
3 changed files
with
43 additions
and
18 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
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
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,21 +1,42 @@ | ||
import os | ||
from subprocess import Popen, PIPE | ||
|
||
try: | ||
from setuptools import setup | ||
from setuptools import setup, find_packages | ||
except ImportError: | ||
from distutils.core import setup | ||
import os | ||
from distutils.core import setup, find_packages | ||
|
||
try: | ||
import pypandoc | ||
long_description = pypandoc.convert('README.md', 'rst') | ||
except (IOError, ImportError): | ||
long_description = "" | ||
|
||
with open('requirements.txt') as f: | ||
required = f.read().splitlines() | ||
|
||
def get_git_version(default="v0.0.1"): | ||
try: | ||
p = Popen(['git', 'describe', '--tags'], stdout=PIPE, stderr=PIPE) | ||
p.stderr.close() | ||
line = p.stdout.readlines()[0] | ||
line = line.strip() | ||
return line | ||
except: | ||
return default | ||
|
||
setup( | ||
name='adsmutils', | ||
version=get_git_version(default="v0.0.1"), | ||
url='https://github.com/adsabs/ADSMicroserviceUtils', | ||
license='MIT', | ||
author="NASA/SAO ADS", | ||
description='ADS Microservice Utils', | ||
long_description=long_description, | ||
packages=find_packages(), | ||
include_package_data=True, | ||
zip_safe=False, | ||
platforms='any', | ||
install_requires=required, | ||
) | ||
|
||
setup(name='adsmutils', | ||
version='0.0.1', | ||
packages=['adsmutils'], | ||
install_requires=[ | ||
'ConcurrentLogHandler==0.9.1', | ||
'python-dateutil==2.6.0', | ||
'DateTime==4.1.1', | ||
'SQLAlchemy==1.1.6', | ||
'setuptools>=36.5.0', | ||
'six>=1.11.0', | ||
'Flask-SQLAlchemy==2.2', | ||
'python-json-logger==0.1.8' | ||
], | ||
) |