utils/src/poetry2setup.py
2023-03-23 00:21:57 -04:00

17 lines
331 B
Python

from pathlib import Path
from poetry.core.factory import Factory
from poetry.core.masonry.builders.sdist import SdistBuilder
def build_setup_py():
return SdistBuilder(Factory().create_poetry(Path(".").resolve())).build_setup()
def main():
print(build_setup_py().decode("utf8"))
if __name__ == "__main__":
main()