Skip to content

Commit bd3c638

Browse files
authored
correction setup to read the requirements file
1 parent b9d4310 commit bd3c638

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
def read(fname):
55
return open(os.path.join(os.path.dirname(__file__), fname)).read()
66

7-
with open('requirements.txt') as f:
8-
required = f.read().splitlines()
7+
here = os.path.abspath(os.path.dirname(__file__))
8+
9+
# What packages are required for this module to be executed?
10+
try:
11+
with open(os.path.join(here, 'requirements.txt'), encoding='utf-8') as f:
12+
required = f.read().split('\n')
13+
except:
14+
required = []
915

1016
setup(
1117
name = "fourier_neural_operator",
@@ -18,4 +24,4 @@ def read(fname):
1824
install_requires=required,
1925
long_description_content_type='text/markdown',
2026
download_url = "https://github.com/Forbu/fourier_neural_operator/archive/refs/tags/first.tar.gz",
21-
)
27+
)

0 commit comments

Comments
 (0)