Skip to content

Commit

Permalink
docs: fix setup.py called from different cwd
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
James R. Barlow committed Jun 9, 2018
1 parent 1de7412 commit 18ec305
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from setuptools.command.build_ext import build_ext
import sys
import setuptools
from os.path import join, dirname
from glob import glob


Expand Down Expand Up @@ -90,9 +91,11 @@ def build_extensions(self):
ext.extra_compile_args = opts
build_ext.build_extensions(self)

tests_require = [line.strip() for line in
open('test_requirements.txt')
if line.strip() and not line.strip().startswith('#')]
with open(join(dirname(__file__), 'test_requirements.txt')) as f:
tests_require = [
line.strip() for line in f
if line.strip() and not line.strip().startswith('#')
]

setup(
name='pikepdf',
Expand Down

0 comments on commit 18ec305

Please sign in to comment.