setup.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env python3
  2. from setuptools import setup
  3. import os
  4. import sys
  5. basedir = os.path.abspath(os.path.dirname(__file__))
  6. sys.path.insert(0, basedir)
  7. from partmgr.core.version import VERSION_STRING
  8. if os.name.lower() == "nt":
  9. from cx_Freeze import setup, Executable
  10. cx_Freeze = True
  11. else:
  12. cx_Freeze = False
  13. extraKeywords = {}
  14. if cx_Freeze:
  15. extraKeywords["executables"] = [
  16. Executable(script="partmgr-gui"),
  17. ]
  18. extraKeywords["options"] = {
  19. "build_exe" : {
  20. "packages" : [ "partmgr", ],
  21. }
  22. }
  23. with open(os.path.join(basedir, "README.rst"), "rb") as fd:
  24. readmeText = fd.read().decode("UTF-8")
  25. setup(
  26. name = "partmgr",
  27. version = VERSION_STRING,
  28. description = "Part manager",
  29. license = "GNU General Public License v2 or later",
  30. author = "Michael Buesch",
  31. author_email = "m@bues.ch",
  32. url = "http://bues.ch/h/partmgr",
  33. packages = [ "partmgr",
  34. "partmgr/core",
  35. "partmgr/pricefetch",
  36. "partmgr/gui", ],
  37. scripts = [ "partmgr-gui", ],
  38. keywords = [ ],
  39. install_requires = [ "PySide6", ],
  40. classifiers = [
  41. ],
  42. long_description=readmeText,
  43. long_description_content_type="text/x-rst",
  44. **extraKeywords
  45. )