Skip to content

Commit 73d1911

Browse files
committed
Fix setup.py
1 parent 9c3f445 commit 73d1911

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

33
import re
4+
import os.path
45
import shutil
56
import sys
67

@@ -13,7 +14,8 @@ def get_dist(pkgname):
1314
except DistributionNotFound:
1415
return None
1516

16-
shutil.copyfile('imgp', 'imgp.py')
17+
if os.path.isfile('imgp'):
18+
shutil.copyfile('imgp', 'imgp.py')
1719

1820
with open('imgp.py', encoding='utf-8') as f:
1921
version = re.search('_VERSION_ = \'([^\']+)\'', f.read()).group(1)

0 commit comments

Comments
 (0)