Commit acca5634 authored by James Coyle's avatar James Coyle

Merge branch 'pypy-setup' into 'master'

Pypi is now integrated and will build to test and live

See merge request james.coyle/storjalytics-client!3
parents 9a130058 0bca8244
Pipeline #1088 passed with stages
in 1 second
before_script:
- export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/mvn
variables:
PYPY_USERNAME: SECRET
PYPY_TEST_PASSWORD: SECRET
PYPY_LIVE_PASSWORD: SECRET
stages:
- set-env
- deploy
- cleanup
set-pypirc:
stage: set-env
when: always
script:
- rm -rf ~/.pypirc
- echo "[distutils]" >> ~/.pypirc
- echo "index-servers=" >> ~/.pypirc
- echo " pypi" >> ~/.pypirc
- echo " pypitest" >> ~/.pypirc
- echo "" >> ~/.pypirc
- echo "[pypi]" >> ~/.pypirc
- echo "username':'$PYPI_USERNAME" >> ~/.pypirc
- echo "password':'$PYPI_LIVE_PASSWORD" >> ~/.pypirc
- echo "" >> ~/.pypirc
- echo "[pypitest]" >> ~/.pypirc
- echo "repository':' https://test.pypi.org/legacy/" >> ~/.pypirc
- echo "username':'$PYPI_USERNAME" >> ~/.pypirc
- echo "password':'$PYPI_TEST_PASSWORD" >> ~/.pypirc
- chmod 600 ~/.pypirc
tags:
- storjapi
deploy-test:
stage: deploy
script:
- python setup.py bdist_wheel --universal
- echo twine upload --repository pypitest dist/*
except:
- master
tags:
- storjapi
environment:
name: test
deploy-production:
stage: deploy
script:
- python setup.py bdist_wheel --universal
- echo twine upload --repository pypi dist/*
only:
- master
tags:
- storjapi
environment:
name: production
cleanup_pypirc:
stage: cleanup
when: always
script:
- rm -rf ~/.pypirc
tags:
- storjapi
#!/usr/bin/env python3
from setuptools import setup
from pip.req import parse_requirements
setup(name='storjstatus-client',
version=VERSION,
description='Storj utility for reporting farmer statistics',
license='Apache2',
exec(open('storjstatus/version.py').read())
def dependencies():
return parse_requirements('requirements.txt', session=False)
def readme():
with open('README.md') as f:
return f.read()
setup(name='storjstatus',
version=__version__,
description='A utility for reporting Storj farmer statistics',
long_description=readme(),
license='MIT',
packages=['storjstatus'],
version='0.2.0',
author='James Coyle',
author_email='[email protected]',
python_requires='>=3.5',
url='https://www.storjstatus.com/install-client',
install_requires=[
'requests==2.18.4',
'python-crontab==2.2.8',
'jstyleson==0.0.2',
],
install_requires=[str(ir.req) for ir in dependencies()],
entry_points={
'console_scripts': [
'storjstatus-register=storjstatus:register',
......
from storjstatus import storjstatus_send
from storjstatus import storjstatus_register
from storjstatus import storjstatus_common
from version import __version__
def send():
storjstatus_send.init_send()
......
......@@ -2,10 +2,12 @@ import os
import re
import subprocess
VERSION = '0.2.0'
CONFIGFILE = '/etc/storjstatus/config.json'
APIENDPOINT = 'https://www.storjstatus.com/api/'
exec(open('version.py').read())
def setup_env():
global ENV
......
__version__ = '0.2.0'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment