-
Notifications
You must be signed in to change notification settings - Fork 4k
When installing CLIP via pip on Python 3.10+ systems with setuptools … #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| import os | ||
|
|
||
|
|
||
| from setuptools import setup, find_packages | ||
|
|
||
| setup( | ||
|
|
@@ -11,9 +9,10 @@ | |
| author="OpenAI", | ||
| packages=find_packages(exclude=["tests*"]), | ||
| install_requires=[ | ||
| line.strip() | ||
| stripped | ||
| for line in open(os.path.join(os.path.dirname(__file__), "requirements.txt")) | ||
| if line.strip() and not line.startswith("#") | ||
| for stripped in [line.strip()] | ||
| if stripped and not stripped.startswith("#") | ||
|
Comment on lines
+12
to
+15
|
||
| ], | ||
| include_package_data=True, | ||
| extras_require={'dev': ['pytest']}, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open(..."requirements.txt")is used directly inside the list comprehension without a context manager, so the file handle may remain unclosed until GC. Consider reading the file with awith open(...)(and ideally an explicit encoding) before constructinginstall_requiresto avoid resource warnings and improve robustness on Windows.