Skip to content

Commit b1e5c0f

Browse files
committed
Allow xlwt on Python 2
Use xlwt-future only on Python 3
1 parent 4cde31f commit b1e5c0f

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

.moban.d/travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66
- pypy
77
{%endblock%}
88

9+
{%block extra_matrix%}
10+
matrix:
11+
include:
12+
- python: 2.7
13+
dist: trusty
14+
sudo: required
15+
virtualenv:
16+
system_site_packages: true
17+
addons:
18+
apt:
19+
packages:
20+
- python-xlwt
21+
- python-xlrd
22+
- python-coverage
23+
- python-nose
24+
- python-mock
25+
{%endblock%}
26+
927
{%block custom_install %}
1028
- pip install https://github.com/pyexcel/pyexcel-io/archive/master.zip
1129
- pip install https://github.com/pyexcel/pyexcel/archive/master.zip

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ python:
1010
- 3.3
1111
- 3.4
1212
- 3.5
13+
matrix:
14+
include:
15+
- python: 2.7
16+
dist: trusty
17+
sudo: required
18+
virtualenv:
19+
system_site_packages: true
20+
addons:
21+
apt:
22+
packages:
23+
- python-xlwt
24+
- python-xlrd
25+
- python-coverage
26+
- python-nose
27+
- python-mock
1328
before_install:
1429
- pip install https://github.com/pyexcel/pyexcel-io/archive/master.zip
1530
- pip install https://github.com/pyexcel/pyexcel/archive/master.zip

pyexcel_xls.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ file_type: xls
66
dependencies:
77
- pyexcel-io>=0.1.0
88
- xlrd
9-
- xlwt-future
9+
- xlwt;python_version<"3"
10+
- xlwt-future;python_version>="3"
1011
description: A wrapper library to read, manipulate and write data in xls format. It reads xlsx and xlsm format

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pyexcel-io>=0.1.0
22
xlrd
3-
xlwt-future
3+
xlwt;python_version<"3"
4+
xlwt-future;python_version>="3"

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@
2424
INSTALL_REQUIRES = [
2525
'pyexcel-io>=0.1.0',
2626
'xlrd',
27-
'xlwt-future',
2827
]
2928

3029
EXTRAS_REQUIRE = {
30+
':python_version<"3"': [
31+
'xlwt'
32+
],
33+
':python_version>="3"': [
34+
'xlwt-future'
35+
],
3136
}
3237

3338
CLASSIFIERS = [

0 commit comments

Comments
 (0)