Skip to content

Commit

Permalink
Updated numerous repo addresses & revs of pre-commit-hooks. on behalf…
Browse files Browse the repository at this point in the history
… of @xavier2k6
  • Loading branch information
arvidn committed Jul 4, 2023
1 parent 9e750fa commit b82b350
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 37 deletions.
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
#- id: trailing-whitespace
#- id: end-of-file-fixer
Expand All @@ -32,12 +32,12 @@ repos:
- id: check-symlinks
- id: check-toml
- repo: https://github.com/pappasam/toml-sort
rev: v0.20.1
rev: v0.23.1
hooks:
- id: toml-sort
args: [--all, --in-place]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: rst-directive-colons
- id: rst-inline-touching-normal
Expand Down Expand Up @@ -71,8 +71,8 @@ repos:
tools/run_benchmark.py|
tools/update_copyright.py
)$
- repo: https://github.com/myint/autoflake
rev: v1.7.6
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args: [--in-place, --remove-unused-variables, --remove-all-unused-imports, --remove-duplicate-keys]
Expand All @@ -85,8 +85,8 @@ repos:
tools/gen_convenience_header.py|
tools/libtorrent_lldb.py
)
- repo: https://github.com/python/black
rev: 22.10.0
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
# Avoiding PR bloat
Expand Down Expand Up @@ -132,7 +132,7 @@ repos:
name: black (pyi)
types: [pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
rev: v1.3.0
hooks:
- id: mypy
# Avoiding PR bloat
Expand Down Expand Up @@ -171,7 +171,7 @@ repos:
tools/update_copyright.py
)$
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
exclude: |
Expand Down
1 change: 0 additions & 1 deletion bindings/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def write_b2_python_config(


class LibtorrentBuildExt(build_ext_lib.build_ext):

CONFIG_MODE_DISTUTILS = "distutils"
CONFIG_MODE_B2 = "b2"
CONFIG_MODES = (CONFIG_MODE_DISTUTILS, CONFIG_MODE_B2)
Expand Down
44 changes: 22 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,71 +6,71 @@ skip = "{pp*,}"

[tool.cibuildwheel.macos]
before-all = [
"./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT",
"brew install openssl",
"./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT",
"brew install openssl"
]
test-command = [
"cd {project}/bindings/python",
"python test.py",
"cd {project}/bindings/python",
"python test.py"
]

[tool.cibuildwheel.macos.environment]
BOOST_BUILD_PATH = "/tmp/boost/tools/build"
BOOST_ROOT = "/tmp/boost"
BOOST_VERSION = "1.81.0"
MACOSX_DEPLOYMENT_TARGET = "10.9" # required for full C++11 support
MACOSX_DEPLOYMENT_TARGET = "10.9" # required for full C++11 support
PATH = "/tmp/boost:$PATH"

[[tool.cibuildwheel.overrides]]
before-all = [
"./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT",
"yum install -y glibc-static", # needed for libutil.a and libdl.a
"./tools/cibuildwheel/setup_ccache_on_manylinux.sh",
"./tools/cibuildwheel/setup_openssl.sh",
"./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT",
"./tools/cibuildwheel/setup_ccache_on_manylinux.sh",
"./tools/cibuildwheel/setup_openssl.sh",
"yum install -y glibc-static" # needed for libutil.a and libdl.a
]
before-test = "ccache -s"
select = "*-manylinux_*"
test-command = [
"cd {project}/bindings/python",
"python test.py",
"cd {project}/bindings/python",
"python test.py"
]

[tool.cibuildwheel.overrides.environment] # sub-table of previous block!
[tool.cibuildwheel.overrides.environment] # sub-table of previous block!
BOOST_BUILD_PATH = "/tmp/boost/tools/build"
BOOST_ROOT = "/tmp/boost"
BOOST_VERSION = "1.81.0"
PATH = "/usr/local/ccache/bin:/tmp/boost:$PATH"

[[tool.cibuildwheel.overrides]]
before-all = [
"./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT",
"apk add ccache openssl-dev openssl-libs-static",
"./tools/cibuildwheel/setup_openssl.sh",
"./tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT",
"./tools/cibuildwheel/setup_openssl.sh",
"apk add ccache openssl-dev openssl-libs-static"
]
before-test = "ccache -s"
select = "*-musllinux_*"
test-command = [
"cd {project}/bindings/python",
"python test.py",
"cd {project}/bindings/python",
"python test.py"
]

[tool.cibuildwheel.overrides.environment] # sub-table of previous block!
[tool.cibuildwheel.overrides.environment] # sub-table of previous block!
BOOST_BUILD_PATH = "/tmp/boost/tools/build"
BOOST_ROOT = "/tmp/boost"
BOOST_VERSION = "1.81.0"
PATH = "/usr/lib/ccache/bin:/tmp/boost:$PATH"

[[tool.cibuildwheel.overrides]]
before-all = [
"bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'",
"bash -c 'choco install --no-progress --x86 openssl'", # choco only allows EITHER 32 OR 64-bit version of a package
"bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'",
"bash -c 'choco install --no-progress --x86 openssl'" # choco only allows EITHER 32 OR 64-bit version of a package
]
select = "*-win32"

[[tool.cibuildwheel.overrides]]
before-all = [
"bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'",
"bash -c 'choco install --no-progress openssl'", # choco only allows EITHER 32 OR 64-bit version of a package
"bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'",
"bash -c 'choco install --no-progress openssl'" # choco only allows EITHER 32 OR 64-bit version of a package
]
select = "*-win_amd64"

Expand Down
5 changes: 0 additions & 5 deletions tools/vmstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def add_counter(key: str, val: float) -> None:
val = val / time_delta
output[key] = [val]
else:

if m.cumulative:
raw_val = val
val = (val - output[key + "-raw"][-1]) / time_delta
Expand Down Expand Up @@ -209,7 +208,6 @@ def add_counter(key: str, val: float) -> None:
# Locked: 0 kB

else:

import psutil

def capture_sample(
Expand All @@ -231,7 +229,6 @@ def capture_sample(
output["time"].append(timestamp)

for key in dir(mem):

if key not in metrics:
if not key.startswith("_") and key not in [
"pagefile",
Expand Down Expand Up @@ -259,7 +256,6 @@ def capture_sample(
output[key].append(val)

for key in dir(io_cnt):

if key not in metrics:
if not key.startswith("_") and key not in [
"pagefile",
Expand All @@ -286,7 +282,6 @@ def capture_sample(


def print_output_to_file(out: Dict[str, List[int]], filename: str) -> List[str]:

if out == {}:
return []

Expand Down

0 comments on commit b82b350

Please sign in to comment.