Skip to content

Commit

Permalink
chore: fix travis build failing because of python-semantic-release Py…
Browse files Browse the repository at this point in the history
…2 incompatibility
  • Loading branch information
user2589 committed Jan 23, 2019
1 parent cf05e1d commit 8b9f537
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ 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:
- pip install -r requirements.txt
- pip install sphinx sphinx-autobuild
- pip install python-semantic-release
install: make install_dev
script: make html

deploy:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ install:
install_dev:
$(MAKE) install
pip install sphinx sphinx-autobuild
pip install python-semantic-release
pip install python-semantic-release==3.11.2
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

import datetime
import os
import sys

Expand All @@ -20,17 +21,17 @@

# -- Project information -----------------------------------------------------

import stgithub
import stgithub as package

py_namespace = 'stgithub'
project = u'strudel.ghutils'
copyright = u'2018, Marat (@cmu.edu)'
author = stgithub.__author__
author = package.__author__
copyright = datetime.datetime.now().strftime("%Y, " + author)

# The short X.Y version
version = ".".join(stgithub.__version__.split(".", 3)[:2])
version = ".".join(package.__version__.split(".", 3)[:2])
# The full version, including alpha/beta/rc tags
release = stgithub.__version__
release = package.__version__


# -- General configuration ---------------------------------------------------
Expand Down
12 changes: 2 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,21 @@
import re
from setuptools import setup

# get author and version from stgithub.py
# get author, version and license from package files
# since it has some not yet installed dependencies, parsing the file:
head = open('stgithub.py').read(2048)
pattern = """__%s__\\s*=\\s*['"]([^'"]*)['"]"""
pattern = r"""__%s__\s*=\s*['"]([^'"]*)['"]"""
kwargs = {keyword: re.search(pattern % keyword, head).group(1)
for keyword in ('version', 'author', 'license')}

# extract requirements.
# Dev requirements are listed in Makefile (see install_dev)
requirements = [
line.strip()
for line in open('requirements.txt')
if line.strip() and not line.strip().startswith('#')]


# 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.ghutils",
description="Interface to undocumented GitHub API",
long_description=open('README.md').read(),
Expand All @@ -41,9 +36,6 @@
],
platforms=["Linux", "Solaris", "Mac OS-X", "Unix", "Windows"],
python_requires='>2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4',
# entry_points={'console_scripts': [
# 'console_scripts = stscraper.github:print_limits',
# ]},
py_modules=['stgithub'],
url='https://github.com/cmustrudel/strudel.ghutils',
install_requires=requirements,
Expand Down

0 comments on commit 8b9f537

Please sign in to comment.