We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97574ae commit 0d18141Copy full SHA for 0d18141
1 file changed
setup.py
@@ -1,7 +1,17 @@
1
+from os.path import exists
2
+
3
from setuptools import setup
4
-with open("VERSION") as file: # Created in CI
- version = file.readline()
5
+if exists("VERSION"): # GitHub Actions
6
+ with open("VERSION") as file:
7
+ version = file.readline()
8
+elif exists("PKG-INFO"): # Conda
9
+ with open("PKG-INFO") as file:
10
+ for line in file:
11
+ if line.startswith("Version: "):
12
+ version = line[9:]
13
+ break
14
+else: raise FileNotFoundError("Can't find the version number")
15
16
setup(
17
name="Isconna",
0 commit comments