Skip to content

Commit

Permalink
pex: rely on system site-packages for RPM packages installed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTereshenkov committed Apr 2, 2024
1 parent 91b1cf5 commit 4077a16
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ args = ["-v", "--vcr-record=none"]

[tailor]
ignore_paths = ["requirements/BUILD"]

[pex]
verbosity = 9
10 changes: 10 additions & 0 deletions requirements/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,13 @@ python_requirements(
source="requirements-dev.txt",
resolve="devtools",
)

python_requirement(
name="python-requirement",
modules=[
"tabulate",
],
requirements=[
"python3-tabulate",
],
)
19 changes: 17 additions & 2 deletions requirements/requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// "setuptools",
// "types-python-dateutil",
// "types-requests",
// "typing-extensions"
// "typing-extensions",
// "python3-tabulate"
// ],
// "manylinux": "manylinux2014",
// "requirement_constraints": [],
Expand Down Expand Up @@ -157,6 +158,19 @@
"requires_python": ">=3.7",
"version": "8.1.7"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28",
"url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl"
}
],
"project_name": "python3-tabulate",
"requires_dists": [],
"requires_python": ">=3.7",
"version": "9999"
},
{
"artifacts": [
{
Expand Down Expand Up @@ -460,7 +474,8 @@
"setuptools",
"types-python-dateutil",
"types-requests",
"typing-extensions"
"typing-extensions",
"python3-tabulate"
],
"requires_python": [
"<3.10,>=3.9"
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ setuptools
typing-extensions
types-python-dateutil
types-requests
python3-tabulate
1 change: 1 addition & 0 deletions tests/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ python_tests(
"cheeseshop:project-version",
":cassettes",
],
extra_env_vars=["PEX_EXTRA_SYS_PATH"]
)

resources(
Expand Down
3 changes: 3 additions & 0 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import pytest
from click.testing import CliRunner

import tabulate
from cheeseshop.cli import cli
from cheeseshop.version import VERSION


def test_cli():

assert tabulate.tabulate("") == ""
runner = CliRunner()
result = runner.invoke(cli.cli, ["--version"])
assert result.exit_code == 0
Expand Down

0 comments on commit 4077a16

Please sign in to comment.