Reference constraint files from requirement files (#37751)
* Reference constraint files from requirement files * Update azure-pipelines-wheels.yml Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
parent
0bf772b68b
commit
0bcc8624b7
8 changed files with 39 additions and 56 deletions
24
.github/workflows/ci.yaml
vendored
24
.github/workflows/ci.yaml
vendored
|
@ -48,7 +48,7 @@ jobs:
|
|||
python -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install -U pip setuptools
|
||||
pip install -r requirements.txt -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements.txt -r requirements_test.txt
|
||||
# Uninstalling typing as a workaround. Eventually we should make sure
|
||||
# all our dependencies drop typing.
|
||||
# Find offending deps with `pipdeptree -r -p typing`
|
||||
|
@ -583,8 +583,7 @@ jobs:
|
|||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name:
|
||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
id: cache-venv
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
@ -598,15 +597,14 @@ jobs:
|
|||
${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('requirements_all.txt') }}
|
||||
${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}
|
||||
${{ runner.os }}-venv-${{ matrix.python-version }}-
|
||||
- name:
|
||||
Create full Python ${{ matrix.python-version }} virtual environment
|
||||
- name: Create full Python ${{ matrix.python-version }} virtual environment
|
||||
if: steps.cache-venv.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
python -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install -U pip setuptools wheel
|
||||
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_all.txt
|
||||
pip install -r requirements_test.txt
|
||||
# Uninstalling typing as a workaround. Eventually we should make sure
|
||||
# all our dependencies drop typing.
|
||||
# Find offending deps with `pipdeptree -r -p typing`
|
||||
|
@ -624,8 +622,7 @@ jobs:
|
|||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name:
|
||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
id: cache-venv
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
@ -659,8 +656,7 @@ jobs:
|
|||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name:
|
||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
id: cache-venv
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
@ -696,8 +692,7 @@ jobs:
|
|||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name:
|
||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
id: cache-venv
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
@ -757,8 +752,7 @@ jobs:
|
|||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name:
|
||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||
id: cache-venv
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
|
@ -44,7 +44,7 @@ stages:
|
|||
python -m venv venv
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
|
@ -117,7 +117,7 @@ stages:
|
|||
python -m venv venv
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
|
@ -165,7 +165,7 @@ stages:
|
|||
|
||||
. venv/bin/activate
|
||||
pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test_all.txt
|
||||
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
|
||||
# Find offending deps with `pipdeptree -r -p typing`
|
||||
pip uninstall -y typing
|
||||
|
@ -209,8 +209,8 @@ stages:
|
|||
|
||||
. venv/bin/activate
|
||||
pip install -U pip setuptools wheel
|
||||
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_all.txt
|
||||
pip install -r requirements_test.txt
|
||||
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
|
||||
# Find offending deps with `pipdeptree -r -p typing`
|
||||
pip uninstall -y typing
|
||||
|
@ -234,7 +234,7 @@ stages:
|
|||
python -m venv venv
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pip install -e . -r requirements_test.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
|
|
|
@ -17,7 +17,7 @@ schedules:
|
|||
- dev
|
||||
variables:
|
||||
- name: versionWheels
|
||||
value: '1.12.4-3.8-alpine3.12'
|
||||
value: '1.13.0-3.8-alpine3.12'
|
||||
resources:
|
||||
repositories:
|
||||
- repository: azure
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
-c homeassistant/package_constraints.txt
|
||||
|
||||
# Home Assistant Core
|
||||
aiohttp==3.6.1
|
||||
astral==1.10.1
|
||||
|
|
|
@ -1,24 +1,6 @@
|
|||
# Home Assistant Core, full dependency set
|
||||
|
||||
aiohttp==3.6.1
|
||||
astral==1.10.1
|
||||
async_timeout==3.0.1
|
||||
attrs==19.3.0
|
||||
bcrypt==3.1.7
|
||||
certifi>=2020.4.5.1
|
||||
ciso8601==2.1.3
|
||||
importlib-metadata==1.6.0;python_version<'3.8'
|
||||
jinja2>=2.11.1
|
||||
PyJWT==1.7.1
|
||||
cryptography==2.9.2
|
||||
pip>=8.0.3
|
||||
python-slugify==4.0.0
|
||||
pytz>=2020.1
|
||||
pyyaml==5.3.1
|
||||
requests==2.24.0
|
||||
ruamel.yaml==0.15.100
|
||||
voluptuous==0.11.7
|
||||
voluptuous-serialize==2.4.0
|
||||
-c homeassistant/package_constraints.txt
|
||||
-r requirements.txt
|
||||
|
||||
# homeassistant.components.nuimo_controller
|
||||
--only-binary=all nuimo==0.1.0
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# make new things fail. Manually update these pins when pulling in a
|
||||
# new version
|
||||
|
||||
-c homeassistant/package_constraints.txt
|
||||
-r requirements_test_pre_commit.txt
|
||||
asynctest==0.13.0
|
||||
codecov==2.1.0
|
||||
|
@ -20,4 +21,4 @@ pytest-timeout==1.3.4
|
|||
pytest-xdist==1.32.0
|
||||
pytest==5.4.3
|
||||
requests_mock==1.8.0
|
||||
responses==0.10.6
|
||||
responses==0.10.6
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Home Assistant tests, full dependency set
|
||||
# Automatically generated by gen_requirements_all.py, do not edit
|
||||
|
||||
-c homeassistant/package_constraints.txt
|
||||
-r requirements_test.txt
|
||||
|
||||
# homeassistant.components.homekit
|
||||
|
|
|
@ -224,9 +224,11 @@ def generate_requirements_list(reqs):
|
|||
|
||||
def requirements_output(reqs):
|
||||
"""Generate output for requirements."""
|
||||
output = []
|
||||
output.append("# Home Assistant Core")
|
||||
output.append("\n")
|
||||
output = [
|
||||
"-c homeassistant/package_constraints.txt\n",
|
||||
"\n",
|
||||
"# Home Assistant Core\n",
|
||||
]
|
||||
output.append("\n".join(core_requirements()))
|
||||
output.append("\n")
|
||||
|
||||
|
@ -235,11 +237,11 @@ def requirements_output(reqs):
|
|||
|
||||
def requirements_all_output(reqs):
|
||||
"""Generate output for requirements_all."""
|
||||
output = []
|
||||
output.append("# Home Assistant Core, full dependency set\n")
|
||||
output.append("\n")
|
||||
output.append("\n".join(core_requirements()))
|
||||
output.append("\n")
|
||||
output = [
|
||||
"# Home Assistant Core, full dependency set\n"
|
||||
"-c homeassistant/package_constraints.txt\n",
|
||||
"-r requirements.txt\n",
|
||||
]
|
||||
output.append(generate_requirements_list(reqs))
|
||||
|
||||
return "".join(output)
|
||||
|
@ -247,11 +249,12 @@ def requirements_all_output(reqs):
|
|||
|
||||
def requirements_test_output(reqs):
|
||||
"""Generate output for test_requirements."""
|
||||
output = []
|
||||
output.append("# Home Assistant tests, full dependency set\n")
|
||||
output.append(
|
||||
f"# Automatically generated by {Path(__file__).name}, do not edit\n\n"
|
||||
)
|
||||
output = [
|
||||
"# Home Assistant tests, full dependency set\n",
|
||||
f"# Automatically generated by {Path(__file__).name}, do not edit\n",
|
||||
"\n",
|
||||
"-c homeassistant/package_constraints.txt\n",
|
||||
]
|
||||
output.append("-r requirements_test.txt\n")
|
||||
|
||||
filtered = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue