setup.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/usr/bin/env python
  2. from distutils.core import setup
  3. import re
  4. long_description = """
  5. A Pure-Python library built as a PDF toolkit. It is capable of:
  6. - extracting document information (title, author, ...)
  7. - splitting documents page by page
  8. - merging documents page by page
  9. - cropping pages
  10. - merging multiple pages into a single page
  11. - encrypting and decrypting PDF files
  12. - and more!
  13. By being Pure-Python, it should run on any Python platform without any
  14. dependencies on external libraries. It can also work entirely on StringIO
  15. objects rather than file streams, allowing for PDF manipulation in memory.
  16. It is therefore a useful tool for websites that manage or manipulate PDFs.
  17. """
  18. VERSIONFILE="PyPDF2/_version.py"
  19. verstrline = open(VERSIONFILE, "rt").read()
  20. VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
  21. mo = re.search(VSRE, verstrline, re.M)
  22. if mo:
  23. verstr = mo.group(1)
  24. else:
  25. raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE))
  26. setup(
  27. name="PyPDF2",
  28. version=verstr,
  29. description="PDF toolkit",
  30. long_description=long_description,
  31. author="Mathieu Fenniak",
  32. author_email="biziqe@mathieu.fenniak.net",
  33. maintainer="Phaseit, Inc.",
  34. maintainer_email="PyPDF2@phaseit.net",
  35. url="https://mstamy2.github.io/PyPDF2",
  36. project_urls={
  37. "Source": "https://github.com/mstamy2/PyPDF2",
  38. "Bug Reports": "https://github.com/mstamy2/PyPDF2/issues",
  39. "Changelog": "https://raw.githubusercontent.com/mstamy2/PyPDF2/master/CHANGELOG",
  40. },
  41. classifiers = [
  42. "Development Status :: 5 - Production/Stable",
  43. "Intended Audience :: Developers",
  44. "License :: OSI Approved :: BSD License",
  45. "Programming Language :: Python :: 2",
  46. "Programming Language :: Python :: 3",
  47. "Operating System :: OS Independent",
  48. "Topic :: Software Development :: Libraries :: Python Modules",
  49. ],
  50. packages=["PyPDF2"],
  51. )