-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Move setup properties out of setup.py in to setup.cfg #12417
Conversation
I'm just moving across install_reuirements too |
I had a quick look before going to bed - and there is nothing that I would not like in this change @ashb :). As long as all the cases we had (installing locally, installing via Github llnk, installing via PyPI) work - this is all fine. There are a few (or maybe just one - INSTALL_REQUIREMENTS order - check_install_and_setup_requires in Nothing controversial in this PR really :) |
Yeah the possible contriversal stuff (version detection, extra requires) needed more brain power to think of that I have tonight. So I'm doing sort of mechanical easy-to-do changes :D |
b990bd2
to
f2892a4
Compare
Updated the sort checking in pre-commit. Setup tool provides a |
@@ -779,7 +779,8 @@ jobs: | |||
cache-name: cache-kubernetes-tests-v7-master | |||
with: | |||
path: ".build/.kubernetes_venv*" | |||
key: "venv-${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('setup.py') }}\ | |||
key: "venv-${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('setup.py')\ | |||
-${{ hashFiles('setup.cfg') }}\ |
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.
Good point!
docs/installation.rst
Outdated
@@ -27,7 +27,7 @@ Getting Airflow | |||
Airflow is published as ``apache-airflow`` package in PyPI. Installing it however might be sometimes tricky | |||
because Airflow is a bit of both a library and application. Libraries usually keep their dependencies open and | |||
applications usually pin them, but we should do neither and both at the same time. We decided to keep | |||
our dependencies as open as possible (in ``setup.py``) so users can install different version of libraries | |||
our dependencies as open as possible (in ``setup.cfg``) so users can install different version of libraries |
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.
Should not that be (for now at least) both setup.py and setup.cfg?
setup.cfg
Outdated
|
||
[options.packages.find] | ||
exclude = | ||
airflow.providers |
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 believe find: uses "find_packages" not the namespace ones (there is a separate find_namespace:)? So we probably do not need those "excludes" here.
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 lift-and-shift of the find_packages()
call from setup.py. You are right though.
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.
Love it! Few small Nits/
.github/workflows/ci.yml
Outdated
@@ -788,6 +789,7 @@ jobs: | |||
with: | |||
path: ".build/bin" | |||
key: "bin-${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('setup.py') }}\ | |||
-${{ hashFiles('setup.cfg') }}\ |
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.
Actually here we can remove both setup.py and setup.cfg. The ./buld/bin content only depends on the version of tools used (helm//kind/kubectl) and it does not depend on setup.py nor setup.cfg in any way. That was probably a copy&paste problem.
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.
Will do. (I didn't check the logic here, just saw setup.py being fingerprinted and added setup.cfg)
The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it! |
I've moved all the ones that are "static" -- any form of dynamic or interpolated values are left in setup.py If a value is passed as n kwrg to setup and in setup.cfg, the kwarg wins out.
00b274f
to
8d3fac7
Compare
The PR apache#12417 broke CI.yaml accidentally. This PR fixes it.
The PR #12417 broke CI.yaml accidentally. This PR fixes it.
The PR apache#12417 broke CI.yaml accidentally. This PR fixes it. (cherry picked from commit 93b3270)
I've moved all the ones that are "static" -- any form of dynamic or interpolated values are left in setup.py
If a value is passed as n kwrg to setup and in setup.cfg, the kwarg wins out.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.