Skip to content

Commit 6bdb91a

Browse files
committed
Fix ci / package_version.py script to support __version__
1 parent 740cb7f commit 6bdb91a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.ci/package-version.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66

77

88
def main():
9-
setup_py = os.path.join(os.path.dirname(os.path.dirname(__file__)),
10-
'setup.py')
9+
version_file = os.path.join(
10+
os.path.dirname(os.path.dirname(__file__)), 'uvloop', '__init__.py')
1111

12-
with open(setup_py, 'r') as f:
12+
with open(version_file, 'r') as f:
1313
for line in f:
14-
if line.startswith('VERSION ='):
14+
if line.startswith('__version__ ='):
1515
_, _, version = line.partition('=')
1616
print(version.strip(" \n'\""))
1717
return 0
1818

19-
print('could not find package version in setup.py', file=sys.stderr)
19+
print('could not find package version in uvloop/__init__.py',
20+
file=sys.stderr)
2021
return 1
2122

2223

0 commit comments

Comments
 (0)