setup.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from setuptools import setup
  4. try:
  5. from cx_Freeze import setup, Executable
  6. cx_Freeze = True
  7. except ImportError:
  8. cx_Freeze = False
  9. import warnings
  10. import os
  11. import sys
  12. from libpwman import __version__
  13. basedir = os.path.abspath(os.path.dirname(__file__))
  14. for base in (os.getcwd(), basedir):
  15. sys.path.insert(0, base)
  16. isWindows = os.name.lower() in {"nt", "ce"}
  17. isPosix = os.name.lower() == "posix"
  18. # Create freeze executable list.
  19. extraKeywords = {}
  20. if cx_Freeze:
  21. extraKeywords["executables"] = [ Executable(script="pwman") ]
  22. extraKeywords["options"] = {
  23. "build_exe" : {
  24. "packages" : [ "readline",
  25. "pyreadline3",
  26. "curses",
  27. "_curses",
  28. "sqlite3",
  29. "sqlite3.dump", ],
  30. "excludes" : [ "tkinter", ],
  31. }
  32. }
  33. warnings.filterwarnings("ignore", r".*'python_requires'.*")
  34. warnings.filterwarnings("ignore", r".*'install_requires'.*")
  35. warnings.filterwarnings("ignore", r".*'long_description_content_type'.*")
  36. with open(os.path.join(basedir, "README.rst"), "rb") as fd:
  37. readmeText = fd.read().decode("UTF-8")
  38. setup(
  39. name = "pwman-python",
  40. version = __version__,
  41. description = "Commandline password manager",
  42. author = "Michael Büsch",
  43. author_email = "m@bues.ch",
  44. url = "https://bues.ch/h/pwman",
  45. python_requires = ">=3.7",
  46. install_requires = [ "pycryptodomex", ],
  47. packages = [ "libpwman", ],
  48. scripts = [ "pwman", ],
  49. keywords = "password manager command line TOTP 2FA",
  50. classifiers = [
  51. "Development Status :: 5 - Production/Stable",
  52. "Environment :: Console",
  53. "Intended Audience :: Developers",
  54. "Intended Audience :: Information Technology",
  55. "Intended Audience :: End Users/Desktop",
  56. "Intended Audience :: System Administrators",
  57. "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
  58. "Operating System :: OS Independent",
  59. "Programming Language :: Python :: 3",
  60. ],
  61. long_description=readmeText,
  62. long_description_content_type="text/x-rst",
  63. **extraKeywords
  64. )