Skip to content

Commit

Permalink
Grab version from git tags and read requirements from file
Browse files Browse the repository at this point in the history
  • Loading branch information
marblestation committed Aug 29, 2018
1 parent c6bf28b commit cfc2060
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/adsabs/ADSMicroserviceUtils.svg?branch=master)](https://travis-ci.org/adsabs/ADSMicroserviceUtils)
[![Coverage Status](https://coveralls.io/repos/github/adsabs/ADSMicroserviceUtils/badge.svg?branch=master)](https://coveralls.io/github/adsabs/ADSMicroserviceUtils?branch=master)

# ADSPipelineUtils
# ADSMicroserviceUtils
Set of common libraries used by ADS microservices.

Class ADSFlask is to be used by all the microservice applications, where logging is setup automatically.
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ 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
setuptools>=36.5.0
python-json-logger==0.1.8
requests==2.19.1
55 changes: 38 additions & 17 deletions setup.py
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'
],
)

0 comments on commit cfc2060

Please sign in to comment.