-
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.
fix(setup.py): better catch for circular dependency
- Loading branch information
1 parent
ac8b8a2
commit 43ae4cd
Showing
1 changed file
with
5 additions
and
7 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 |
---|---|---|
|
@@ -3,12 +3,10 @@ | |
# add these line to integrate the queenbee packaging process into Python packaging | ||
try: | ||
from pollination_dsl.package import PostInstall, PostDevelop | ||
except ModuleNotFoundError as error: | ||
if 'No module named' in error and 'pollination_dsl' in error: | ||
# this is the case for the first time install pollination_dsl hasn't been | ||
# installed yet | ||
pass | ||
raise ModuleNotFoundError(error) | ||
cmd_class = {'develop': PostDevelop, 'install': PostInstall} | ||
except ModuleNotFoundError: | ||
# this will happen the very first time when pollination_dsl is not installed | ||
cmd_class = {} | ||
|
||
|
||
with open("README.md", "r") as fh: | ||
|
@@ -19,7 +17,7 @@ | |
|
||
# normal setuptool inputs | ||
setuptools.setup( | ||
cmdclass={'develop': PostDevelop, 'install': PostInstall}, # this is critical for local packaging | ||
cmdclass=cmd_class, # this is critical for local packaging | ||
name='pollination-honeybee-radiance', # will be used for package name unless it is overwritten using __queenbee__ info. | ||
author='ladybug-tools', # the owner account for this package - required if pushed to Pollination | ||
author_email='[email protected]', | ||
|