Skip to content

Commit

Permalink
Use pathlib instead of os.path
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Pinard committed Apr 5, 2020
1 parent 354f9f9 commit 166015e
Showing 1 changed file with 30 additions and 38 deletions.
68 changes: 30 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

# Standard library modules.
import os
from pathlib import Path

# Third party modules.
from setuptools import setup, find_packages
Expand All @@ -10,44 +10,36 @@
import versioneer

# Globals and constants variables.
BASEDIR = os.path.abspath(os.path.dirname(__file__))
BASEDIR = Path(__file__).parent.resolve()

# Get the long description from the relevant file
with open(os.path.join(BASEDIR, 'README.rst'), 'r') as f:
with open(BASEDIR.joinpath("README.rst"), "r") as f:
long_description = f.read()

setup(name='matplotlib-scalebar',
version=versioneer.get_version(),
description='Artist for matplotlib to display a scale bar',
long_description=long_description,

author='Philippe Pinard',
author_email='philippe.pinard@gmail.com',
maintainer='Philippe Pinard',
maintainer_email='philippe.pinard@gmail.com',

url='https://github.com/ppinard/matplotlib-scalebar',
license='BSD',
keywords='matplotlib scale micron bar',

classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Visualization'
],

packages=find_packages(),
package_data={},

install_requires=['matplotlib'],

zip_safe=True,

test_suite='nose.collector',

cmdclass=versioneer.get_cmdclass(),

)
setup(
name="matplotlib-scalebar",
version=versioneer.get_version(),
description="Artist for matplotlib to display a scale bar",
long_description=long_description,
author="Philippe Pinard",
author_email="philippe.pinard@gmail.com",
maintainer="Philippe Pinard",
maintainer_email="philippe.pinard@gmail.com",
url="https://github.com/ppinard/matplotlib-scalebar",
license="BSD",
keywords="matplotlib scale micron bar",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Visualization",
],
packages=find_packages(),
package_data={},
install_requires=["matplotlib"],
zip_safe=True,
test_suite="nose.collector",
cmdclass=versioneer.get_cmdclass(),
)

0 comments on commit 166015e

Please sign in to comment.