|
- #!/usr/bin/env python
-
- try:
- from setuptools import setup
- except ImportError:
- from distutils.core import setup
-
- DESCRIPTION = "{{ cookiecutter.project_short_description }}"
- GITHUB_URL = "https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
-
- with open("requirements/prod.txt", encoding="utf-8") as file:
- requirements = file.read().split("\n")
- with open("requirements/test.txt", encoding="utf-8") as file:
- test_requirements = list(
- filter(
- lambda req: not req.startswith("-"),
- file.read().split("\n"),
- )
- )
- with open("requirements/dev.txt", encoding="utf-8") as file:
- dev_requirements = list(
- filter(
- lambda req: not req.startswith("-"),
- file.read().split("\n"),
- )
- )
- test_requirements.extend(requirements)
- dev_requirements.extend(test_requirements)
-
- with open("README.md", encoding="utf-8") as file:
- readme = file.read()
- with open("HISTORY.md", encoding="utf-8") as file:
- history = file.read()
-
- setup(
- name="{{ cookiecutter.project_slug }}",
- version="{{ cookiecutter.version }}",
- description=DESCRIPTION,
- long_description=readme + "\n\n" + history,
- long_description_content_type="text/markdown",
- author="{{ cookiecutter.full_name }}",
- author_email="{{ cookiecutter.email }}",
- url=GITHUB_URL,
- license="LGPL-3",
- keywords="{{ cookiecutter.project_slug }}",
- project_urls={"Source": GITHUB_URL},
- packages=[
- "{{ cookiecutter.project_slug }}",
- ],
- package_dir={"{{ cookiecutter.project_slug }}": "{{ cookiecutter.project_slug }}"},
- include_package_data=True,
- install_requires=requirements,
- extras_require={"dev": dev_requirements},
- tests_require=test_requirements,
- test_suite="tests",
- zip_safe=False,
- classifiers=[
- "Programming Language :: Python :: 3",
- "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
- "Operating System :: POSIX :: Linux",
- "Natural Language :: English",
- ],
- )
|