Skip to content

Commit

Permalink
Move everything from setup.py to setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumpe committed Jul 2, 2019
1 parent 6fc0e50 commit 3a3ce36
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 49 deletions.
26 changes: 26 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
[metadata]
name = pyorg
version = attr: pyorg.__version__
description = Package for working with Emacs org-mode files
long_description = file: README.md
author = Jared Lumpe
author_email = '[email protected]
url = https://github.com/jlumpe/pyorg
[options]
python_requires = >=3.5
install_requires =
setup_requires =
pytest-runner
tests_require =
pytest
packages = find:
include_package_data = true
# Aliases for setuptools commands
[aliases]
test = pytest
Expand Down
51 changes: 2 additions & 49 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,52 +1,5 @@
"""Setuptools installation script for pyorg package."""

from setuptools import setup, find_packages
import re
from setuptools import setup


# Get contents of README file
with open('README.md') as fh:
readme_contents = fh.read()


# Read version from root module __init__.py
with open('pyorg/__init__.py') as fh:
init_contents = fh.read()
version_match = re.search('^__version__ = ["\']([^"\']+)["\']', init_contents, re.M)

if not version_match:
raise RuntimeError('Unable to get version string')

version = version_match.group(1)


requirements = [
]

setup_requirements = ['pytest-runner']

test_requirements = ['pytest']


setup(
name='pyorg',
version=version,
description='Package for working with Emacs org-mode files',
long_description=readme_contents,
author='Jared Lumpe',
author_email='[email protected]',
url='https://github.com/jlumpe/pyorg',
python_requires='>=3.5',
install_requires=requirements,
setup_requires=setup_requirements,
tests_require=test_requirements,
packages=find_packages(),
include_package_data=True,
# license='',
# classifiers='',
# keywords=[],
# platforms=[],
# provides=[],
# requires=[],
# obsoletes=[],
)
setup()

0 comments on commit 3a3ce36

Please sign in to comment.