Skip to content

Commit 2bfb706

Browse files
DOC: Update install docs [ci skip] (#29)
* DOC: Update install docs [ci skip] * PKG: use environment markers * TST: Fix Py2 tests
1 parent bad804b commit 2bfb706

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

docs/source/install.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
Install
22
=======
33

4-
cyberpandas requires pandas 0.23 or newer, which is currently unreleased.
4+
cyberpandas requires pandas 0.23 or newer. On Python 2, the 3rd party `ipaddress`
5+
module is required (it's built into the standard library in Python 3).
56

6-
Once pandas is installed, cyberpandas can be installed from PyPI
7+
Once pandas is installed, cyberpandas can be installed from conda-forge::
78

8-
.. code-block:: none
9+
conda install -c conda-forge cyberpandas
910

10-
pip install cyberpandas
11+
Or PyPI:
12+
13+
pip install cyberpandas

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from setuptools import setup, find_packages
22
from os import path
33
from codecs import open
4-
import sys
54

65
here = path.abspath(path.dirname(__file__))
76

87
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
98
long_description = f.read()
109

11-
install_requires = ['pandas>=0.23.0', 'six']
12-
13-
if sys.version_info.major == 2:
14-
install_requires.append('ipaddress')
10+
install_requires = [
11+
"pandas>=0.23.0",
12+
"six",
13+
"ipaddress; python_version < '3'"
14+
]
1515

1616
setup(
1717
name='cyberpandas',

tests/ip/test_ip.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,14 @@ def test_from_ndarray(values):
314314

315315
@pytest.mark.parametrize('start, stop, step, expected', [
316316
(1, 3, None, [1, 2]),
317-
('0.0.0.1', '0.0.0.3', None, [1, 2]),
317+
(u'0.0.0.1', u'0.0.0.3', None, [1, 2]),
318318
(2**64 + 1, 2**64 + 3, None, [2**64 + 1, 2**64 + 2]),
319-
('::1:0:0:0:1', '::1:0:0:0:3', None, [2**64 + 1, 2**64 + 2]),
319+
(u'::1:0:0:0:1', u'::1:0:0:0:3', None, [2**64 + 1, 2**64 + 2]),
320320
(2**64 - 1, 2**64 + 2, None, [2**64 - 1, 2**64, 2**64 + 1]),
321-
('::ffff:ffff:ffff:ffff', '::1:0:0:0:2', None,
321+
(u'::ffff:ffff:ffff:ffff', u'::1:0:0:0:2', None,
322322
[2**64 - 1, 2**64, 2**64 + 1]),
323323
(1, 6, 2, [1, 3, 5]),
324-
('0.0.0.1', '0.0.0.6', '0.0.0.2', [1, 3, 5]),
324+
(u'0.0.0.1', u'0.0.0.6', u'0.0.0.2', [1, 3, 5]),
325325
])
326326
def test_ip_range(start, stop, step, expected):
327327
result = ip.ip_range(start, stop, step)

0 commit comments

Comments
 (0)