setup.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env python
  2. """
  3. Setup script
  4. """
  5. # Required to build on EL6
  6. __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
  7. import pkg_resources
  8. from setuptools import setup
  9. from pagure import __version__
  10. def get_requirements(requirements_file='requirements.txt'):
  11. """Get the contents of a file listing the requirements.
  12. :arg requirements_file: path to a requirements file
  13. :type requirements_file: string
  14. :returns: the list of requirements, or an empty list if
  15. `requirements_file` could not be opened or read
  16. :return type: list
  17. """
  18. lines = open(requirements_file).readlines()
  19. return [
  20. line.rstrip().split('#')[0]
  21. for line in lines
  22. if not line.startswith('#')
  23. ]
  24. setup(
  25. name='pagure',
  26. description='A light-weight git-centered forge based on pygit2..',
  27. version=__version__,
  28. author='Pierre-Yves Chibon',
  29. author_email='pingou@pingoured.fr',
  30. maintainer='Pierre-Yves Chibon',
  31. maintainer_email='pingou@pingoured.fr',
  32. license='GPLv2+',
  33. download_url='https://fedorahosted.org/releases/p/r/pagure/',
  34. url='https://fedorahosted.org/pagure/',
  35. packages=['pagure'],
  36. include_package_data=True,
  37. install_requires=get_requirements(),
  38. )