Skip to content

Commit 389a91e

Browse files
committed
use entry points instead of scripts in setup.py, potentially fixing windows issue as well as settings things up for multiprocessing
1 parent b95548c commit 389a91e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
setup(
44
name = 'stylegan2_pytorch',
55
packages = find_packages(),
6-
scripts=['bin/stylegan2_pytorch'],
7-
version = '0.21.1',
6+
entry_points={
7+
'console_scripts': [
8+
'stylegan2_pytorch = stylegan2_pytorch.cli:main',
9+
],
10+
},
11+
version = '0.21.2',
812
license='GPLv3+',
913
description = 'StyleGan2 in Pytorch',
1014
author = 'Phil Wang',

bin/stylegan2_pytorch renamed to stylegan2_pytorch/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,5 @@ def train_from_folder(
102102
if _ % 50 == 0:
103103
model.print_log()
104104

105-
if __name__ == "__main__":
105+
def main():
106106
fire.Fire(train_from_folder)

0 commit comments

Comments
 (0)