Skip to content

Commit 52966de

Browse files
authored
use pathlib (pypa#128)
1 parent 5db250e commit 52966de

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77

88
# Always prefer setuptools over distutils
99
from setuptools import setup, find_packages
10-
from os import path
10+
import pathlib
1111

12-
here = path.abspath(path.dirname(__file__))
12+
here = pathlib.Path(__file__).parent.resolve()
1313

1414
# Get the long description from the README file
15-
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
16-
long_description = f.read()
15+
long_description = (here / 'README.md').read_text(encoding='utf-8')
1716

1817
# Arguments marked as "Required" below must be included for upload to PyPI.
1918
# Fields marked as "Optional" may be commented out.

0 commit comments

Comments
 (0)