This repository was archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
49 lines (40 loc) · 1.41 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
import time
from os.path import abspath, dirname, join
from setuptools import setup
__version__ = '0.0'
__author__ = 'APS Lite team'
def version():
path_version = join(dirname(abspath(__file__)), 'version.txt')
def version_file(mode='r'):
return open(path_version, mode)
if os.path.exists(path_version):
with version_file() as verfile:
return verfile.readline().strip()
if os.getenv('TRAVIS'):
build_version = os.getenv('TRAVIS_BUILD_NUMBER')
elif os.getenv('JENKINS_HOME'):
build_version = 'jenkins{}'.format(os.getenv('BUILD_NUMBER'))
else:
build_version = 'dev{}'.format(int(time.time()))
with version_file('w') as verfile:
verfile.write('{0}.{1}'.format(__version__, build_version))
with version_file() as verfile:
return verfile.readline().strip()
setup(
name='django-gocs',
packages=['django_gocs'],
version=version(),
description='Django file storage backend and temporary file handler for '
'Google Cloud Storage',
long_description=open(join(dirname(__file__), 'README.md')).read(),
author=__author__,
author_email='[email protected]',
install_requires=[
'django',
'GoogleAppEngineCloudStorageClient>=1.9.15.0'
],
url='https://github.com/ingrammicro/django-gocs',
keywords=['django', 'storage', 'gcs', 'google cloud storage'],
classifiers=[],
)