A python library to deal with scientific papers.

setup.py 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env python
  2. try:
  3. from setuptools import setup
  4. except ImportError:
  5. print('[libbmc] setuptools not found.')
  6. raise
  7. with open('libbmc/__init__.py') as fh:
  8. for line in fh:
  9. if line.startswith('__version__'):
  10. version = line.strip().split()[-1][1:-1]
  11. break
  12. try:
  13. from pip.req import parse_requirements
  14. from pip.download import PipSession
  15. except ImportError:
  16. print('[libbmc] pip not found.')
  17. raise
  18. # parse_requirements() returns generator of pip.req.InstallRequirement objects
  19. parsed_requirements = parse_requirements("requirements.txt",
  20. session=PipSession())
  21. # reqs is a list of requirement
  22. # e.g. ['django==1.5.1', 'mezzanine==1.4.6']
  23. install_requires = [str(ir.req) for ir in parsed_requirements]
  24. setup(
  25. name='libbmc',
  26. version=version,
  27. url='https://github.com/Phyks/libbmc/',
  28. author='Phyks (Lucas Verney)',
  29. author_email='phyks@phyks.me',
  30. license='MIT License',
  31. description='A python library to deal with scientific papers.',
  32. packages=['libbmc',
  33. 'libbmc.citations', 'libbmc.papers', 'libbmc.repositories'],
  34. install_requires=install_requires
  35. )