Skip to content

Commit 695346b

Browse files
aleknasdispater
authored andcommitted
Fix setup script (#22)
1 parent 46f14b6 commit 695346b

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ python:
55
- "3.5"
66

77
env:
8-
- PENDULUM_EXTENSIONS=true
9-
- PENDULUM_EXTENSIONS=false
8+
- PENDULUM_EXTENSIONS=1
9+
- PENDULUM_EXTENSIONS=0
1010

1111
before_install:
1212
- pip install codecov

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,14 @@ def get_version():
2424
__version__ = get_version()
2525

2626
# C Extensions
27-
with_extensions = os.environ.get('PENDULUM_EXTENSIONS', '')
27+
with_extensions = os.getenv('PENDULUM_EXTENSIONS', False)
2828

29-
if with_extensions.lower() == 'false':
30-
with_extensions = False
31-
else:
29+
if with_extensions == '1':
3230
with_extensions = True
3331

3432
if hasattr(sys, 'pypy_version_info'):
3533
with_extensions = False
3634

37-
3835
extensions = []
3936
if with_extensions:
4037
try:

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ deps = -rtests-requirements.txt
66
commands = py.test tests -sq
77

88
setenv =
9-
without-extensions: PENDULUM_EXTENSIONS=false
10-
with-extensions: PENDULUM_EXTENSIONS=true
9+
without-extensions: PENDULUM_EXTENSIONS=0
10+
with-extensions: PENDULUM_EXTENSIONS=1
1111

1212
[testenv:flake8]
1313
basepython=python

0 commit comments

Comments
 (0)