refector setup.py. Exclude adding info about readme and manifest, see
@@ -3,30 +3,17 @@ import os
from setuptools import setup, find_packages
+exec(compile(open("lifelines/version.py").read(), "lifelines/version.py", "exec"))
with open("reqs/base-requirements.txt") as f:
- requirements = f.read().splitlines()
-
-
-exec(compile(open("lifelines/version.py").read(), "lifelines/version.py", "exec"))
+ REQUIREMENTS = f.read().splitlines()
with open("README.md") as f:
- long_description = f.read()
+ LONG_DESCRIPTION, LONG_DESC_TYPE = f.read(), "text/markdown"
-setup(
- name="lifelines",
- version=__version__,
- author="Cameron Davidson-Pilon",
- author_email="cam.davidson.pilon@gmail.com",
- description="Survival analysis in Python, including Kaplan Meier, Nelson Aalen and regression",
- license="MIT",
- keywords="survival analysis statistics data analysis",
- url="https://github.com/CamDavidsonPilon/lifelines",
- packages=find_packages(),
- python_requires=">=3.5",
- long_description=long_description,
- long_description_content_type="text/markdown",
- classifiers=[
+NAME = "lifelines"
+AUTHOR_NAME, AUTHOR_EMAIL = "Cameron Davidson-Pilon", "cam.davidson.pilon@gmail.com"
+CLASSIFIERS = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
@@ -34,7 +21,27 @@ setup(
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering",
- ],
- install_requires=requirements,
- package_data={"lifelines": ["../README.md", "../README.txt", "../LICENSE", "../MANIFEST.in", "datasets/*"]},
+]
+LICENSE = "MIT"
+PACKAGE_DATA = {"lifelines": ["datasets/*", "../LICENSE"]}
+DESCRIPTION = "Survival analysis in Python, including Kaplan Meier, Nelson Aalen and regression"
+URL = "https://github.com/CamDavidsonPilon/lifelines"
+PYTHON_REQ = ">=3.5"
+
+setup(
+ name=NAME,
+ version=__version__,
+ author=AUTHOR_NAME,
+ author_email=AUTHOR_EMAIL,
+ description=DESCRIPTION,
+ license=LICENSE,
+ url=URL,
+ python_requires=PYTHON_REQ,
+ long_description=LONG_DESCRIPTION,
+ long_description_content_type=LONG_DESC_TYPE,
+ classifiers=CLASSIFIERS,
+ install_requires=REQUIREMENTS,
+ packages=find_packages(),
+ package_data=PACKAGE_DATA,
+ include_package_data=False,
)
