-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: configure automatic deployment
- Loading branch information
Showing
5 changed files
with
82 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
sudo: required | ||
language: python | ||
python: | ||
- 2.7 | ||
- 3.5 | ||
|
||
cache: | ||
- pip | ||
- packages | ||
|
||
install: | ||
- make install | ||
- pip install requests typing | ||
|
||
script: | ||
- make test | ||
|
||
# jobs instead of deploy to deploy only once (for Python3 build) | ||
jobs: | ||
fast_finish: true | ||
include: | ||
- stage: upload to PYPI, build docs and create a release | ||
# python-semantic-release fails with Travis Python3.5 | ||
python: 2.7 | ||
install: make install_dev | ||
script: make html | ||
|
||
deploy: | ||
- provider: script | ||
skip_cleanup: true | ||
on: | ||
branch: master | ||
script: make publish | ||
|
||
- provider: releases | ||
skip-cleanup: true | ||
api_key: $GH_TOKEN | ||
on: | ||
tags: true | ||
file: dist/* | ||
|
||
- provider: pages | ||
skip-cleanup: true | ||
github-token: $GH_TOKEN | ||
keep-history: true | ||
on: | ||
branch: master | ||
local-dir: docs/build/html | ||
|
||
after_failure: | ||
- pip freeze |
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,3 +1,2 @@ | ||
|
||
requests | ||
strudel.utils |
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,7 +1,17 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import re | ||
from setuptools import setup | ||
|
||
# get author, version and license from package files | ||
# since it has some not yet installed dependencies, parsing the file: | ||
package = 'stscraper' | ||
head = open(os.path.join(package, '__init__.py')).read(2048) | ||
pattern = r"""__%s__\s*=\s*['"]([^'"]*)['"]""" | ||
kwargs = {keyword: re.search(pattern % keyword, head).group(1) | ||
for keyword in ('version', 'author', 'license')} | ||
|
||
requirements = [ | ||
line.strip() | ||
for line in open('requirements.txt') | ||
|
@@ -10,13 +20,7 @@ | |
# options reference: https://docs.python.org/2/distutils/ | ||
# see also: https://packaging.python.org/tutorials/distributing-packages/ | ||
setup( | ||
# whenever you're updating the next three lines | ||
# please also update oscar.py | ||
name="strudel.scraper", | ||
version="0.2.6", # make sure to update __init__.py.__version__ | ||
author='Marat (@cmu.edu)', | ||
author_email='[email protected]', | ||
|
||
description="Python interfaces to Github, Bitbucket and Gitlab APIs", | ||
long_description=open('README.md').read(), | ||
long_description_content_type='text/markdown', | ||
|
@@ -27,18 +31,16 @@ | |
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', | ||
'Operating System :: POSIX :: Linux', | ||
'Topic :: Scientific/Engineering' | ||
], | ||
platforms=["Linux", "Solaris", "Mac OS-X", "Unix", "Windows"], | ||
python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4', | ||
scripts=['scripts/check_gh_limits.py'], | ||
# entry_points={'console_scripts': [ | ||
# 'console_scripts = stscraper.github:print_limits', | ||
# ]}, | ||
packages=['stscraper'], | ||
license="GPL v3.0", | ||
python_requires='>2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4', | ||
scripts=[os.path.join('scripts', 'check_gh_limits.py')], | ||
packages=[package], | ||
url='https://github.com/cmustrudel/strudel.scraper', | ||
install_requires=requirements | ||
install_requires=requirements, | ||
**kwargs | ||
) |