feat: add requires_file attr for py_wheel#644
feat: add requires_file attr for py_wheel#644weixiao-huang wants to merge 3 commits intobazel-contrib:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
0f95f75 to
28e48e7
Compare
|
Any background for why this is needed? Maybe the documentation should be updated to reflect that and what's the interaction with "requires" attribute? |
|
Because sometimes we may write codes like this in #!/usr/bin/env python
from setuptools import setup, find_packages
with open("requirements.txt") as fp:
install_requires = fp.read()
setup(
# get requires from file
install_requires=install_requires,
)However, in If |
|
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
|
Is there any update of this PR? |
|
@weixiao-huang would you be able to rebase this and address conflicts? |
35abc61 to
feba774
Compare
feba774 to
458d28c
Compare
UebelAndre
left a comment
There was a problem hiding this comment.
I'm no maintainer but did have some requests 😅
cd7edd7 to
aa3beac
Compare
| if arguments.requires_file: | ||
| with open(arguments.requires_file) as fp: | ||
| additive_requires_list = ["Requires-Dist: {}".format(line) for line in fp.read().strip().split("\n")] | ||
| metadata += "\n" + "\n".join(additive_requires_list) |
There was a problem hiding this comment.
Won't that leave you with two \n in a row, so everything below will be interpreted as a description?
Can we have a test?
|
|
||
| if arguments.requires_file: | ||
| with open(arguments.requires_file) as fp: | ||
| additive_requires_list = ["Requires-Dist: {}".format(line) for line in fp.read().strip().split("\n")] |
There was a problem hiding this comment.
why read().strip().split() and not readlines()?
|
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
|
@weixiao-huang knudge |
|
Sorry, I'll check it recently |
|
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
|
This PR was automatically closed because it went 30 days without a reply since it was labeled "Can Close?" |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information