From a0fb28975309f2ea4c355e1bdb013152be97042b Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Sun, 20 Jan 2019 11:18:56 -0500 Subject: Finish migration from py.path to pathlib --- setup.py | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 522aa39..5e68f4e 100644 --- a/setup.py +++ b/setup.py @@ -1,42 +1,44 @@ -from setuptools import setup, find_packages -from dotfiles import __version__ +import io +import re +from setuptools import setup + +with io.open("README.md", "rt", encoding="utf8") as f: + readme = f.read() + +with io.open("dotfiles/__init__.py", "rt", encoding="utf8") as f: + version = re.search(r"__version__ = \'(.*?)\'", f.read()).group(1) setup( name='dotfiles', - version=__version__, - description='Easily manage your dotfiles', - long_description=open('README.md', encoding='utf-8').read(), - long_description_content_type='text/markdown', - author='Jon Bernard', - author_email='jbernard@jbernard.io', - license='ISC', + version=version, url='https://github.com/jbernard/dotfiles', - packages=find_packages(), - tests_require=[ - 'pytest', - 'pytest-flake8', - ], - setup_requires=['pytest-runner'], - entry_points={ - 'console_scripts': [ - 'dotfiles=dotfiles.cli:cli', - ], + project_urls={ + 'Code': 'https://github.com/jbernard/dotfiles', + 'Issues': 'https://github.com/jbernard/dotfiles/issues', }, - install_requires=['click'], + license='ISC', + author='Jon Bernard', + author_email='jbernard@jbernard.io', + description='Easily manage your dotfiles', + long_description=readme, + long_description_content_type='text/markdown', + packages=["dotfiles"], + python_requires=">=3.6", classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: ISC License (ISCL)' 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Topic :: Utilities', ], - project_urls={ - 'Bug Reports': 'https://github.com/jbernard/dotfiles/issues', - 'Source': 'https://github.com/jbernard/dotfiles', + install_requires=['click'], + setup_requires=['pytest-runner'], + tests_require=['pytest', 'pytest-flake8'], + entry_points={ + 'console_scripts': [ + 'dotfiles=dotfiles.cli:cli', + ], }, ) -- cgit v1.2.3