From 2804aa9b51701533371f6e3ce253d4c1bff784cd Mon Sep 17 00:00:00 2001 From: jadbin Date: Fri, 31 Aug 2018 11:48:28 +0800 Subject: [PATCH] fix path --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 9c92c7d..9ae7276 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,16 @@ # coding=utf-8 import sys -from os.path import join, abspath, dirname +from os.path import join, dirname from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand -with open('README.rst', 'r', encoding='utf-8') as fd: +with open(join(dirname(__file__), 'README.rst'), 'r', encoding='utf-8') as fd: long_description = fd.read() def read_version(): - p = join(abspath(dirname(__file__)), "xpaw", "version.py") + p = join(dirname(__file__), "xpaw", "version.py") with open(p, 'r', encoding='utf-8') as f: return f.read().split("=")[-1].strip().strip('"') @@ -29,7 +29,7 @@ def run_tests(self): 'cssselect>=1.0.3,<2.0' ] -with open('requirements_test.txt', 'r') as f: +with open(join(dirname(__file__), 'requirements_test.txt'), 'r', encoding='utf-8') as f: tests_require = [l.strip() for l in f]