setup.py 1.7 KB

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