setup.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. """ Setup
  2. """
  3. from setuptools import setup, find_packages
  4. from codecs import open
  5. from os import path
  6. here = path.abspath(path.dirname(__file__))
  7. # Get the long description from the README file
  8. with open(path.join(here, 'README.md'), encoding='utf-8') as f:
  9. long_description = f.read()
  10. def _read_reqs(relpath):
  11. fullpath = path.join(path.dirname(__file__), relpath)
  12. with open(fullpath) as f:
  13. return [s.strip() for s in f.readlines() if (s.strip() and not s.startswith("#"))]
  14. REQUIREMENTS = _read_reqs("requirements.txt")
  15. TRAINING_REQUIREMENTS = _read_reqs("requirements-training.txt")
  16. exec(open('src/open_clip/version.py').read())
  17. setup(
  18. name='open_clip_torch',
  19. version=__version__,
  20. description='OpenCLIP',
  21. long_description=long_description,
  22. long_description_content_type='text/markdown',
  23. url='https://github.com/mlfoundations/open_clip',
  24. author='',
  25. author_email='',
  26. classifiers=[
  27. # How mature is this project? Common values are
  28. # 3 - Alpha
  29. # 4 - Beta
  30. # 5 - Production/Stable
  31. 'Development Status :: 3 - Alpha',
  32. 'Intended Audience :: Education',
  33. 'Intended Audience :: Science/Research',
  34. 'License :: OSI Approved :: Apache Software License',
  35. 'Programming Language :: Python :: 3.7',
  36. 'Programming Language :: Python :: 3.8',
  37. 'Programming Language :: Python :: 3.9',
  38. 'Programming Language :: Python :: 3.10',
  39. 'Topic :: Scientific/Engineering',
  40. 'Topic :: Scientific/Engineering :: Artificial Intelligence',
  41. 'Topic :: Software Development',
  42. 'Topic :: Software Development :: Libraries',
  43. 'Topic :: Software Development :: Libraries :: Python Modules',
  44. ],
  45. # Note that this is a string of words separated by whitespace, not a list.
  46. keywords='CLIP pretrained',
  47. package_dir={'': 'src'},
  48. packages=find_packages(where='src'),
  49. include_package_data=True,
  50. install_requires=REQUIREMENTS,
  51. extras_require={
  52. "training": TRAINING_REQUIREMENTS,
  53. },
  54. python_requires='>=3.7',
  55. )