Skip to content

Commit

Permalink
Merge pull request #10 from danielsclint/ft_python_27
Browse files Browse the repository at this point in the history
Python 2.7 Backport
  • Loading branch information
invisiblefunnel authored Dec 10, 2017
2 parents 5bdc47c + 2cc6dd0 commit d36e6b0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ language: python
python:
- 3.6
- 3.5
- 2.7
# TODO(DW) fix
# - 3.4
# - 3.3
Expand Down
2 changes: 1 addition & 1 deletion partridge/gtfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ def trip_counts_by_date(self):
# No pruning or type coercion
class raw_feed(feed):
def __init__(self, path):
super().__init__(path, config=nx.DiGraph())
super(raw_feed, self).__init__(path, config=nx.DiGraph())
6 changes: 5 additions & 1 deletion partridge/utilities.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from functools import lru_cache
try:
from functools import lru_cache
except ImportError:
from functools32 import lru_cache

import numpy as np
import pandas as pd
from pandas.core.common import flatten
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ cryptography
PyYAML
pytest
pytest-runner
networkx
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# -*- coding: utf-8 -*-

"""The setup script."""
import io
import sys

from setuptools import setup, find_packages

Expand All @@ -13,7 +15,7 @@

# About dict to store version and package info
about = dict()
with open('partridge/__version__.py', 'r', encoding='utf-8') as f:
with io.open('partridge/__version__.py', 'r', encoding='utf-8') as f:
exec(f.read(), about)

requirements = [
Expand All @@ -32,7 +34,8 @@
setup(
name='partridge',
version=about['__version__'],
description='Partridge is python library for working with GTFS feeds using pandas DataFrames.',
description='Partridge is python library for working with GTFS '
'feeds using pandas DataFrames.',
long_description=readme + '\n\n' + history,
author='Danny Whalen',
author_email='daniel.r.whalen@gmail.com',
Expand All @@ -47,10 +50,14 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4',
test_suite='tests',
tests_require=test_requirements,
setup_requires=setup_requirements,
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist = py33, py34, py35, flake8
envlist = py27, py33, py34, py35, flake8

[travis]
python =
3.5: py35
3.4: py34
3.3: py33
2.7: py27

[testenv:flake8]
basepython=python
Expand All @@ -17,11 +18,11 @@ setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
py27: functools32
commands =
pip install -U pip
py.test --basetemp={envtmpdir}


; If you want to make tox run the tests with the same versions, create a
; requirements.txt with the pinned versions and uncomment the following lines:
; deps =
Expand Down

0 comments on commit d36e6b0

Please sign in to comment.