You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.2 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: pep517
  3. Version: 0.3
  4. Summary: Wrappers to build Python packages using PEP 517 hooks
  5. Home-page: https://github.com/takluyver/pep517
  6. License: UNKNOWN
  7. Author: Thomas Kluyver
  8. Author-email: thomas@kluyver.me.uk
  9. Description-Content-Type: text/x-rst
  10. Classifier: License :: OSI Approved :: MIT License
  11. Requires-Dist: pytoml
  12. Provides-Extra: .none
  13. `PEP 517 <https://www.python.org/dev/peps/pep-0517/>`_ specifies a standard
  14. API for systems which build Python packages.
  15. This package contains wrappers around the hooks specified by PEP 517. It
  16. provides:
  17. - A mechanism to call the hooks in a subprocess, so they are isolated from
  18. the current process.
  19. - Fallbacks for the optional hooks, so that frontends can call the hooks without
  20. checking which are defined.
  21. - Higher-level functions which install the build dependencies into a
  22. temporary environment and build a wheel/sdist using them.
  23. Run the tests with ``py.test``.
  24. High level usage, with build requirements handled:
  25. .. code-block:: python
  26. import os
  27. from pep517.envbuild import build_wheel, build_sdist
  28. src = 'path/to/source' # Folder containing 'pyproject.toml'
  29. destination = 'also/a/folder'
  30. whl_filename = build_wheel(src, destination)
  31. assert os.path.isfile(os.path.join(destination, whl_filename))
  32. targz_filename = build_sdist(src, destination)
  33. assert os.path.isfile(os.path.join(destination, targz_filename))
  34. Lower level usage—you are responsible for ensuring build requirements are
  35. available:
  36. .. code-block:: python
  37. import os
  38. from pep517.wrappers import Pep517HookCaller
  39. src = 'path/to/source' # Folder containing 'pyproject.toml'
  40. hooks = Pep517HookCaller(src)
  41. print(hooks.build_sys_requires) # List of static requirements
  42. config_options = {} # Optional parameters for backend
  43. # List of dynamic requirements:
  44. print(hooks.get_requires_for_build_wheel(config_options))
  45. destination = 'also/a/folder'
  46. whl_filename = hooks.build_wheel(destination, config_options)
  47. assert os.path.isfile(os.path.join(destination, whl_filename))
  48. To test the build backend for a project, run in a system shell:
  49. .. code-block:: shell
  50. python3 -m pep517.check path/to/source # source dir containing pyproject.toml