Skip to content

Commit

Permalink
Resolve version constraints for black package installation (#1671)
Browse files Browse the repository at this point in the history
* added constraints.txt

* added log

* removed verison.cfg

* added flake8

---------

Co-authored-by: David Glick <david@glicksoftware.com>
  • Loading branch information
Akshat2Jain and davisagli committed Jul 14, 2023
1 parent ea0f2c7 commit 477bfa4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip

# install black (extract version from versions.cfg)
# install black (with constraints)
- name: install black
run: pip install click==$(awk '/^click =/{print $NF}' versions.cfg) black==$(awk '/^black =/{print $NF}' versions.cfg)
run: pip install -c constraints.txt black

# run black
- name: run black
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

# install flake8
- name: install flake8
run: pip install flake8==$(awk '/^flake8 =/{print $NF}' versions.cfg)
run: pip install -c constraints.txt flake8

# run black
- name: run flake8
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ update: ## Update Make and Buildout
bin/buildout: bin/pip
bin/pip install --upgrade pip
bin/pip install -r requirements-5.2.txt
bin/pip install black || true
bin/pip install -c constraints.txt black
@touch -c $@

bin/python bin/pip:
Expand Down
2 changes: 2 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
black == 22.3.0
flake8 == 4.0.1
1 change: 1 addition & 0 deletions news/1671.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated package installation to use constraints.txt for black package, ensuring compatibility and consistent versions. @Akshat2Jain
30 changes: 0 additions & 30 deletions versions.cfg

This file was deleted.

0 comments on commit 477bfa4

Please sign in to comment.