Generate a Python package project using the Python Cookiecutter package
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/usr/bin/env python
  2. try:
  3. from setuptools import setup
  4. except ImportError:
  5. from distutils.core import setup
  6. DESCRIPTION = "{{ cookiecutter.project_short_description }}"
  7. GITHUB_URL = "https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
  8. with open("requirements/prod.txt", encoding="utf-8") as file:
  9. requirements = file.read().split("\n")
  10. with open("requirements/test.txt", encoding="utf-8") as file:
  11. test_requirements = list(
  12. filter(
  13. lambda req: not req.startswith("-"),
  14. file.read().split("\n"),
  15. )
  16. )
  17. with open("requirements/dev.txt", encoding="utf-8") as file:
  18. dev_requirements = list(
  19. filter(
  20. lambda req: not req.startswith("-"),
  21. file.read().split("\n"),
  22. )
  23. )
  24. test_requirements.extend(requirements)
  25. dev_requirements.extend(test_requirements)
  26. with open("README.md", encoding="utf-8") as file:
  27. readme = file.read()
  28. with open("HISTORY.md", encoding="utf-8") as file:
  29. history = file.read()
  30. setup(
  31. name="{{ cookiecutter.project_slug }}",
  32. version="{{ cookiecutter.version }}",
  33. description=DESCRIPTION,
  34. long_description=readme + "\n\n" + history,
  35. long_description_content_type="text/markdown",
  36. author="{{ cookiecutter.full_name }}",
  37. author_email="{{ cookiecutter.email }}",
  38. url=GITHUB_URL,
  39. license="LGPL-3",
  40. keywords="{{ cookiecutter.project_slug }}",
  41. project_urls={"Source": GITHUB_URL},
  42. packages=[
  43. "{{ cookiecutter.project_slug }}",
  44. ],
  45. package_dir={"{{ cookiecutter.project_slug }}": "{{ cookiecutter.project_slug }}"},
  46. include_package_data=True,
  47. install_requires=requirements,
  48. extras_require={"dev": dev_requirements},
  49. tests_require=test_requirements,
  50. test_suite="tests",
  51. zip_safe=False,
  52. classifiers=[
  53. "Programming Language :: Python :: 3",
  54. "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
  55. "Operating System :: POSIX :: Linux",
  56. "Natural Language :: English",
  57. ],
  58. )