setup.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env python
  2. import os
  3. import sys
  4. import re
  5. from setuptools import setup
  6. base_path = os.path.dirname(__file__)
  7. requirements = []
  8. if os.name == "nt" and sys.version_info < (3, 0):
  9. # Required due to missing socket.inet_ntop & socket.inet_pton method in Windows Python 2.x
  10. requirements.append("win-inet-pton")
  11. with open("README.md") as f:
  12. long_description = f.read()
  13. with open(os.path.join(base_path, "socks.py")) as f:
  14. VERSION = re.compile(r'.*__version__ = "(.*?)"', re.S).match(f.read()).group(1)
  15. setup(
  16. name="PySocks",
  17. version=VERSION,
  18. description="A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information.",
  19. long_description=long_description,
  20. long_description_content_type="text/markdown",
  21. url="https://github.com/Anorov/PySocks",
  22. license="BSD",
  23. author="Anorov",
  24. author_email="anorov.vorona@gmail.com",
  25. keywords=["socks", "proxy"],
  26. py_modules=["socks", "sockshandler"],
  27. install_requires=requirements,
  28. python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
  29. classifiers=(
  30. "Programming Language :: Python :: 2",
  31. "Programming Language :: Python :: 2.7",
  32. "Programming Language :: Python :: 3",
  33. "Programming Language :: Python :: 3.4",
  34. "Programming Language :: Python :: 3.5",
  35. "Programming Language :: Python :: 3.6",
  36. ),
  37. )