-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Source dist #7262
Source dist #7262
Conversation
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.
Looks like a good start. I did a preliminary pass through the implementation. I did not get to dive too much into the tests nor trying out the implementation yet. I'll try to get through that in the next pass.
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.
I just did a follow up pass in trying it all out locally. It was looking good. Just left some comments after trying it out a bit.
[with_download_deps=no] | ||
) | ||
if test "$with_download_deps" = no; then | ||
${PYTHON} ${srcdir}/backends/build_system validate-env --artifact $with_install_type || AC_MSG_ERROR("Python dependencies not met") |
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.
It may be worth including as part of the output the suggestion of either install these dependencies yourself or rerun configure with the --with-download-deps
flag
AC_ARG_WITH(install_type, | ||
AS_HELP_STRING([--with-install-type=@<:@system-sandbox|portable-exe@:>@], | ||
[Specify type of AWS CLI installation. Options are: | ||
"portable-exe", "system-sandbox" (default is "system-sandbox")]), |
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.
It may be worth expanding on what each of these install types entail and why to use it. Or if we can add a link to some reference that would be handy too.
[Download all dependencies and use those when | ||
building the AWS CLI. If not specified, the dependencies | ||
(including all python packages) must be installed | ||
on your system]), |
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.
It may be worth noting some of the caveats with this flag as detailed in the proposal: https://github.com/aws/aws-cli/blob/v2/proposals/source-install.md#backwards-compatibility. Specifically, there is no guarantee that this flag will download all dependencies in future versions and generally there should be no expectation that you upgrade the version of the CLI to install and that flag making build/install process automatically work.
0ff0f36
to
54e85a7
Compare
Codecov Report
@@ Coverage Diff @@
## source-distribution #7262 +/- ##
====================================================
Coverage 93.70% 93.70%
====================================================
Files 351 351
Lines 36171 36171
Branches 5202 5202
====================================================
Hits 33895 33895
Misses 1652 1652
Partials 624 624 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
54e85a7
to
e93b652
Compare
e93b652
to
1e1f8cb
Compare
118333a
to
fe1170e
Compare
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.
It's looking good. Just had some more comments after the latest rebase and looking more into the tests.
dependency_block_re = re.compile( | ||
r"dependencies = \[([\s\S]+?)\]", re.MULTILINE | ||
) | ||
extract_dependencies_re = re.compile(r'"(.+)"') | ||
with open(ROOT_DIR / "pyproject.toml", "r") as f: | ||
data = f.read() | ||
raw_dependencies = dependency_block_re.findall(data)[0] | ||
dependencies = extract_dependencies_re.findall(raw_dependencies) |
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.
We should probably reuse this logic from the pep517.py
module. In general, I would not be opposed to having a backends/utils.py
module for stuff this needs to be shared between this and the PEP517 hooks.
3b7f035
to
80cf441
Compare
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.
Looks good. I mainly focused on the tests this round. I liked the environment abstraction you made for the integration tests.
d511d64
to
32967eb
Compare
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.
It's looking good. I just posted some more smaller comments to help get this polished up so we can merge it to the feature branch.
requirements/bootstrap-lock.txt
Outdated
pip==22.2.2 \ | ||
--hash=sha256:3fd1929db052f056d7a998439176d3333fa1b3f6c1ad881de1885c0717608a4b \ | ||
--hash=sha256:b61a374b5bc40a6e982426aede40c9b5a08ff20e640f5b56977f4f91fed1e39a | ||
# via -r requirements/bootstrap.txt |
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.
Is there a particular reason we have these top-level bootstrap-lock.txt
and bootstrap-win-lock.txt
lock files? I would have assumed we would removed them as the ones that would be used are the ones in the download-deps
directory.
scripts/ci/install
Outdated
run('python -m build') | ||
wheel_dist = glob.glob(os.path.join('dist', '*.whl'))[0] | ||
run('pip install %s' % wheel_dist) | ||
run("pip install setuptools==57.5.0") |
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.
Let's make sure to remove this direct install and defer to our requirements files for dependencies.
ba0a43f
to
901a2d0
Compare
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.
Looks good. Just had a really small clean up comment on print statements, but otherwise let's go ahead and squash this into a single commit.
backends/build_system/utils.py
Outdated
if ' #' in line: | ||
line = line[:line.find(' #')] | ||
if line.endswith('\\'): | ||
print('before', line) |
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.
Looks like a left over print statement here and two lines after. We should just grep to make sure all these files to make sure there are no unintended print statements.
4297fec
to
693ee5b
Compare
Changes: * Add python interface for building from source under backends/build_system * Add autotools interface for calling the python build backend * Add requirements/lock files under requirements/ directory needed for building form source. * Add script for regenerating the requirements lock files from scratch. * add .gitignore entries for autotools
693ee5b
to
c31ebe5
Compare
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.
Looks good! 🚢
No description provided.