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
|
python -m venv venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -U pip setuptools
|
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
|
# Uninstalling typing as a workaround. Eventually we should make sure
|
||||||
# all our dependencies drop typing.
|
# all our dependencies drop typing.
|
||||||
# Find offending deps with `pipdeptree -r -p typing`
|
# Find offending deps with `pipdeptree -r -p typing`
|
||||||
|
@ -583,8 +583,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name:
|
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
|
||||||
id: cache-venv
|
id: cache-venv
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
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') }}-${{ hashFiles('requirements_all.txt') }}
|
||||||
${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}
|
${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements_test.txt') }}
|
||||||
${{ runner.os }}-venv-${{ matrix.python-version }}-
|
${{ runner.os }}-venv-${{ matrix.python-version }}-
|
||||||
- name:
|
- name: Create full Python ${{ matrix.python-version }} virtual environment
|
||||||
Create full Python ${{ matrix.python-version }} virtual environment
|
|
||||||
if: steps.cache-venv.outputs.cache-hit != 'true'
|
if: steps.cache-venv.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -U pip setuptools wheel
|
pip install -U pip setuptools wheel
|
||||||
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
|
pip install -r requirements_all.txt
|
||||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
pip install -r requirements_test.txt
|
||||||
# Uninstalling typing as a workaround. Eventually we should make sure
|
# Uninstalling typing as a workaround. Eventually we should make sure
|
||||||
# all our dependencies drop typing.
|
# all our dependencies drop typing.
|
||||||
# Find offending deps with `pipdeptree -r -p typing`
|
# Find offending deps with `pipdeptree -r -p typing`
|
||||||
|
@ -624,8 +622,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name:
|
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
|
||||||
id: cache-venv
|
id: cache-venv
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -659,8 +656,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name:
|
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
|
||||||
id: cache-venv
|
id: cache-venv
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -696,8 +692,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name:
|
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
|
||||||
id: cache-venv
|
id: cache-venv
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -757,8 +752,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name:
|
- name: Restore full Python ${{ matrix.python-version }} virtual environment
|
||||||
Restore full Python ${{ matrix.python-version }} virtual environment
|
|
||||||
id: cache-venv
|
id: cache-venv
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -44,7 +44,7 @@ stages:
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
|
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
pip install -r requirements_test.txt
|
||||||
pre-commit install-hooks
|
pre-commit install-hooks
|
||||||
- script: |
|
- script: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
|
@ -117,7 +117,7 @@ stages:
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
|
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
pip install -r requirements_test.txt
|
||||||
pre-commit install-hooks
|
pre-commit install-hooks
|
||||||
- script: |
|
- script: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
|
@ -165,7 +165,7 @@ stages:
|
||||||
|
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
|
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.
|
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
|
||||||
# Find offending deps with `pipdeptree -r -p typing`
|
# Find offending deps with `pipdeptree -r -p typing`
|
||||||
pip uninstall -y typing
|
pip uninstall -y typing
|
||||||
|
@ -209,8 +209,8 @@ stages:
|
||||||
|
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -U pip setuptools wheel
|
pip install -U pip setuptools wheel
|
||||||
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
|
pip install -r requirements_all.txt
|
||||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
pip install -r requirements_test.txt
|
||||||
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
|
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
|
||||||
# Find offending deps with `pipdeptree -r -p typing`
|
# Find offending deps with `pipdeptree -r -p typing`
|
||||||
pip uninstall -y typing
|
pip uninstall -y typing
|
||||||
|
@ -234,7 +234,7 @@ stages:
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
|
|
||||||
. venv/bin/activate
|
. 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
|
pre-commit install-hooks
|
||||||
- script: |
|
- script: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
|
|
|
@ -17,7 +17,7 @@ schedules:
|
||||||
- dev
|
- dev
|
||||||
variables:
|
variables:
|
||||||
- name: versionWheels
|
- name: versionWheels
|
||||||
value: '1.12.4-3.8-alpine3.12'
|
value: '1.13.0-3.8-alpine3.12'
|
||||||
resources:
|
resources:
|
||||||
repositories:
|
repositories:
|
||||||
- repository: azure
|
- repository: azure
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
-c homeassistant/package_constraints.txt
|
||||||
|
|
||||||
# Home Assistant Core
|
# Home Assistant Core
|
||||||
aiohttp==3.6.1
|
aiohttp==3.6.1
|
||||||
astral==1.10.1
|
astral==1.10.1
|
||||||
|
|
|
@ -1,24 +1,6 @@
|
||||||
# Home Assistant Core, full dependency set
|
# Home Assistant Core, full dependency set
|
||||||
|
-c homeassistant/package_constraints.txt
|
||||||
aiohttp==3.6.1
|
-r requirements.txt
|
||||||
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
|
|
||||||
|
|
||||||
# homeassistant.components.nuimo_controller
|
# homeassistant.components.nuimo_controller
|
||||||
--only-binary=all nuimo==0.1.0
|
--only-binary=all nuimo==0.1.0
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# make new things fail. Manually update these pins when pulling in a
|
# make new things fail. Manually update these pins when pulling in a
|
||||||
# new version
|
# new version
|
||||||
|
|
||||||
|
-c homeassistant/package_constraints.txt
|
||||||
-r requirements_test_pre_commit.txt
|
-r requirements_test_pre_commit.txt
|
||||||
asynctest==0.13.0
|
asynctest==0.13.0
|
||||||
codecov==2.1.0
|
codecov==2.1.0
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Home Assistant tests, full dependency set
|
# Home Assistant tests, full dependency set
|
||||||
# Automatically generated by gen_requirements_all.py, do not edit
|
# Automatically generated by gen_requirements_all.py, do not edit
|
||||||
|
|
||||||
|
-c homeassistant/package_constraints.txt
|
||||||
-r requirements_test.txt
|
-r requirements_test.txt
|
||||||
|
|
||||||
# homeassistant.components.homekit
|
# homeassistant.components.homekit
|
||||||
|
|
|
@ -224,9 +224,11 @@ def generate_requirements_list(reqs):
|
||||||
|
|
||||||
def requirements_output(reqs):
|
def requirements_output(reqs):
|
||||||
"""Generate output for requirements."""
|
"""Generate output for requirements."""
|
||||||
output = []
|
output = [
|
||||||
output.append("# Home Assistant Core")
|
"-c homeassistant/package_constraints.txt\n",
|
||||||
output.append("\n")
|
"\n",
|
||||||
|
"# Home Assistant Core\n",
|
||||||
|
]
|
||||||
output.append("\n".join(core_requirements()))
|
output.append("\n".join(core_requirements()))
|
||||||
output.append("\n")
|
output.append("\n")
|
||||||
|
|
||||||
|
@ -235,11 +237,11 @@ def requirements_output(reqs):
|
||||||
|
|
||||||
def requirements_all_output(reqs):
|
def requirements_all_output(reqs):
|
||||||
"""Generate output for requirements_all."""
|
"""Generate output for requirements_all."""
|
||||||
output = []
|
output = [
|
||||||
output.append("# Home Assistant Core, full dependency set\n")
|
"# Home Assistant Core, full dependency set\n"
|
||||||
output.append("\n")
|
"-c homeassistant/package_constraints.txt\n",
|
||||||
output.append("\n".join(core_requirements()))
|
"-r requirements.txt\n",
|
||||||
output.append("\n")
|
]
|
||||||
output.append(generate_requirements_list(reqs))
|
output.append(generate_requirements_list(reqs))
|
||||||
|
|
||||||
return "".join(output)
|
return "".join(output)
|
||||||
|
@ -247,11 +249,12 @@ def requirements_all_output(reqs):
|
||||||
|
|
||||||
def requirements_test_output(reqs):
|
def requirements_test_output(reqs):
|
||||||
"""Generate output for test_requirements."""
|
"""Generate output for test_requirements."""
|
||||||
output = []
|
output = [
|
||||||
output.append("# Home Assistant tests, full dependency set\n")
|
"# Home Assistant tests, full dependency set\n",
|
||||||
output.append(
|
f"# Automatically generated by {Path(__file__).name}, do not edit\n",
|
||||||
f"# Automatically generated by {Path(__file__).name}, do not edit\n\n"
|
"\n",
|
||||||
)
|
"-c homeassistant/package_constraints.txt\n",
|
||||||
|
]
|
||||||
output.append("-r requirements_test.txt\n")
|
output.append("-r requirements_test.txt\n")
|
||||||
|
|
||||||
filtered = {
|
filtered = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue