Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@


if __name__ == '__main__':
example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'xrspatial', 'examples')
if 'develop' not in sys.argv:
_package_dir = os.path.dirname(os.path.abspath(__file__))
example_path = os.path.join(_package_dir, 'xrspatial', 'examples')
_is_develop = any(arg == 'develop' or arg.endswith('develop') for arg in sys.argv)
Comment thread
brendancol marked this conversation as resolved.
Outdated
if not _is_develop:
Comment on lines +10 to +13
Comment on lines 9 to +13
pyct.build.examples(example_path, __file__, force=True)

use_scm = {
Expand All @@ -19,4 +20,7 @@
setup(use_scm_version=use_scm)

if os.path.isdir(example_path):
shutil.rmtree(example_path)
_real_example_path = os.path.realpath(example_path)
_real_package_dir = os.path.realpath(_package_dir)
if _real_example_path.startswith(_real_package_dir + os.sep):
shutil.rmtree(example_path)
Comment on lines +25 to +26
Loading