-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca6469c
commit 50bd19f
Showing
1 changed file
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
from setuptools import setup | ||
# this setup.py script is completely generated dynamically by poetry and | ||
# is needed to be able to integrate this project in tools that are based on setuptools | ||
from pathlib import Path | ||
|
||
setup() | ||
from poetry.core.factory import Factory | ||
from poetry.core.masonry.builders.sdist import SdistBuilder | ||
|
||
# let poetry construct setupt.py | ||
cwd_path = Path(".").resolve() | ||
poetry = Factory().create_poetry() | ||
sdist_builder = SdistBuilder(poetry) | ||
setup_py = sdist_builder.build_setup() | ||
|
||
# run setup in the current context | ||
exec(setup_py, globals(), locals()) |