Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 46bab13

Browse filesBrowse files
UebelAndref0rmiga
andauthored
Removed examples that are not platform agnostic (bazel-contrib#620)
* Removed examples that are not platform agnostic * Update examples/pip_install/requirements.in Co-authored-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com> * Update examples/pip_parse/requirements.txt Co-authored-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com> * Delete unused filegroup Co-authored-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
1 parent 66b06b1 commit 46bab13
Copy full SHA for 46bab13

File tree

9 files changed

+22
-382
lines changed
Filter options

9 files changed

+22
-382
lines changed

‎examples/pip_install/BUILD

Copy file name to clipboardExpand all lines: examples/pip_install/BUILD
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ py_test(
5353
# For pip dependencies which have entry points, the `entry_point` macro can be
5454
# used from the generated `pip_install` repository to access a runnable binary.
5555

56-
alias(
57-
name = "sphinx-build",
58-
actual = entry_point(
59-
pkg = "sphinx",
60-
script = "sphinx-build",
61-
),
62-
)
63-
6456
alias(
6557
name = "yamllint",
6658
actual = entry_point("yamllint"),
@@ -77,13 +69,11 @@ py_test(
7769
name = "pip_install_test",
7870
srcs = ["pip_install_test.py"],
7971
data = [
80-
":sphinx-build",
8172
":yamllint",
8273
data_requirement("s3cmd"),
8374
dist_info_requirement("boto3"),
8475
],
8576
env = {
86-
"SPHINX_BUILD_ENTRY_POINT": "$(rootpath :sphinx-build)",
8777
"WHEEL_DATA_CONTENTS": "$(rootpaths {})".format(data_requirement("s3cmd")),
8878
"WHEEL_DIST_INFO_CONTENTS": "$(rootpaths {})".format(dist_info_requirement("boto3")),
8979
"YAMLLINT_ENTRY_POINT": "$(rootpath :yamllint)",

‎examples/pip_install/WORKSPACE

Copy file name to clipboardExpand all lines: examples/pip_install/WORKSPACE
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "bazel_skylib",
7-
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
7+
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
88
urls = [
9-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
10-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
9+
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
10+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
1111
],
1212
)
1313

‎examples/pip_install/pip_install_test.py

Copy file name to clipboardExpand all lines: examples/pip_install/pip_install_test.py
+1-40Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class PipInstallTest(unittest.TestCase):
1212
maxDiff = None
1313

14-
def test_entry_point_void_return(self):
14+
def test_entry_point(self):
1515
env = os.environ.get("YAMLLINT_ENTRY_POINT")
1616
self.assertIsNotNone(env)
1717

@@ -31,45 +31,6 @@ def test_entry_point_void_return(self):
3131
)
3232
self.assertEqual(proc.stdout.decode("utf-8").strip(), "yamllint 1.26.3")
3333

34-
# yamllint entry_point is of the form `def run(argv=None):`
35-
with self.assertRaises(subprocess.CalledProcessError) as context:
36-
subprocess.run(
37-
[entry_point, "--option-does-not-exist"],
38-
check=True,
39-
stdout=subprocess.PIPE,
40-
stderr=subprocess.PIPE,
41-
)
42-
self.assertIn("returned non-zero exit status 2", str(context.exception))
43-
44-
def test_entry_point_int_return(self):
45-
env = os.environ.get("SPHINX_BUILD_ENTRY_POINT")
46-
r = runfiles.Create()
47-
48-
# To find an external target, this must use `{workspace_name}/$(rootpath @external_repo//:target)`
49-
entry_point = Path(
50-
r.Rlocation("rules_python_pip_install_example/{}".format(env))
51-
)
52-
self.assertTrue(entry_point.exists())
53-
54-
proc = subprocess.run(
55-
[str(entry_point), "--version"],
56-
check=True,
57-
stdout=subprocess.PIPE,
58-
stderr=subprocess.PIPE,
59-
)
60-
# sphinx-build uses args[0] for its name, only assert the version here
61-
self.assertTrue(proc.stdout.decode("utf-8").strip().endswith("4.2.0"))
62-
63-
# sphinx-build entry_point is of the form `def main(argv: List[str] = sys.argv[1:]) -> int:`
64-
with self.assertRaises(subprocess.CalledProcessError) as context:
65-
subprocess.run(
66-
[entry_point, "--option-does-not-exist"],
67-
check=True,
68-
stdout=subprocess.PIPE,
69-
stderr=subprocess.PIPE,
70-
)
71-
self.assertIn("returned non-zero exit status 2", str(context.exception))
72-
7334
def test_data(self):
7435
env = os.environ.get("WHEEL_DATA_CONTENTS")
7536
self.assertIsNotNone(env)

‎examples/pip_install/requirements.in

Copy file name to clipboard
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
boto3==1.14.51
22
s3cmd==2.1.0
3-
sphinx==4.2.0
43
yamllint==1.26.3
4+
5+
# Last available for Python 3.6.
6+
setuptools==59.6.0

‎examples/pip_install/requirements.txt

Copy file name to clipboardExpand all lines: examples/pip_install/requirements.txt
+6-146Lines changed: 6 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
#
55
# bazel run //:requirements.update
66
#
7-
alabaster==0.7.12 \
8-
--hash=sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359 \
9-
--hash=sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02
10-
# via sphinx
11-
babel==2.9.1 \
12-
--hash=sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9 \
13-
--hash=sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0
14-
# via sphinx
157
boto3==1.14.51 \
168
--hash=sha256:a6bdb808e948bd264af135af50efb76253e85732c451fa605b7a287faf022432 \
179
--hash=sha256:f9dbccbcec916051c6588adbccae86547308ac4cd154f1eb7cf6422f0e391a71
@@ -22,111 +14,21 @@ botocore==1.17.63 \
2214
# via
2315
# boto3
2416
# s3transfer
25-
certifi==2021.10.8 \
26-
--hash=sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872 \
27-
--hash=sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569
28-
# via requests
29-
charset-normalizer==2.0.7 \
30-
--hash=sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0 \
31-
--hash=sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b
32-
# via requests
3317
docutils==0.15.2 \
3418
--hash=sha256:6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0 \
3519
--hash=sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827 \
3620
--hash=sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99
37-
# via
38-
# botocore
39-
# sphinx
40-
idna==3.3 \
41-
--hash=sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff \
42-
--hash=sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d
43-
# via requests
44-
imagesize==1.2.0 \
45-
--hash=sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1 \
46-
--hash=sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1
47-
# via sphinx
48-
jinja2==3.0.2 \
49-
--hash=sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45 \
50-
--hash=sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c
51-
# via sphinx
21+
# via botocore
5222
jmespath==0.10.0 \
5323
--hash=sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9 \
5424
--hash=sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f
5525
# via
5626
# boto3
5727
# botocore
58-
markupsafe==2.0.1 \
59-
--hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \
60-
--hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \
61-
--hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \
62-
--hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \
63-
--hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \
64-
--hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \
65-
--hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \
66-
--hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \
67-
--hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \
68-
--hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \
69-
--hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \
70-
--hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \
71-
--hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \
72-
--hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \
73-
--hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \
74-
--hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \
75-
--hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \
76-
--hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \
77-
--hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \
78-
--hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \
79-
--hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \
80-
--hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \
81-
--hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \
82-
--hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \
83-
--hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \
84-
--hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \
85-
--hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \
86-
--hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \
87-
--hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \
88-
--hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \
89-
--hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \
90-
--hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \
91-
--hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \
92-
--hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \
93-
--hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \
94-
--hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \
95-
--hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \
96-
--hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \
97-
--hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \
98-
--hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \
99-
--hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \
100-
--hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \
101-
--hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \
102-
--hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \
103-
--hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \
104-
--hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \
105-
--hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \
106-
--hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \
107-
--hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \
108-
--hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \
109-
--hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \
110-
--hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \
111-
--hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \
112-
--hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872
113-
# via jinja2
114-
packaging==21.0 \
115-
--hash=sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7 \
116-
--hash=sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14
117-
# via sphinx
11828
pathspec==0.9.0 \
11929
--hash=sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a \
12030
--hash=sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1
12131
# via yamllint
122-
pygments==2.10.0 \
123-
--hash=sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380 \
124-
--hash=sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6
125-
# via sphinx
126-
pyparsing==2.4.7 \
127-
--hash=sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 \
128-
--hash=sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b
129-
# via packaging
13032
python-dateutil==2.8.2 \
13133
--hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \
13234
--hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9
@@ -137,10 +39,6 @@ python-magic==0.4.24 \
13739
--hash=sha256:4fec8ee805fea30c07afccd1592c0f17977089895bdfaae5fec870a84e997626 \
13840
--hash=sha256:de800df9fb50f8ec5974761054a708af6e4246b03b4bdaee993f948947b0ebcf
13941
# via s3cmd
140-
pytz==2021.3 \
141-
--hash=sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c \
142-
--hash=sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326
143-
# via babel
14442
pyyaml==6.0 \
14543
--hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \
14644
--hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \
@@ -176,10 +74,6 @@ pyyaml==6.0 \
17674
--hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
17775
--hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
17876
# via yamllint
179-
requests==2.26.0 \
180-
--hash=sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24 \
181-
--hash=sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7
182-
# via sphinx
18377
s3cmd==2.1.0 \
18478
--hash=sha256:49cd23d516b17974b22b611a95ce4d93fe326feaa07320bd1d234fed68cbccfa \
18579
--hash=sha256:966b0a494a916fc3b4324de38f089c86c70ee90e8e1cae6d59102103a4c0cc03
@@ -192,52 +86,18 @@ six==1.16.0 \
19286
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
19387
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
19488
# via python-dateutil
195-
snowballstemmer==2.1.0 \
196-
--hash=sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2 \
197-
--hash=sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914
198-
# via sphinx
199-
sphinx==4.2.0 \
200-
--hash=sha256:94078db9184491e15bce0a56d9186e0aec95f16ac20b12d00e06d4e36f1058a6 \
201-
--hash=sha256:98a535c62a4fcfcc362528592f69b26f7caec587d32cd55688db580be0287ae0
202-
# via -r requirements.in
203-
sphinxcontrib-applehelp==1.0.2 \
204-
--hash=sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a \
205-
--hash=sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58
206-
# via sphinx
207-
sphinxcontrib-devhelp==1.0.2 \
208-
--hash=sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e \
209-
--hash=sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4
210-
# via sphinx
211-
sphinxcontrib-htmlhelp==2.0.0 \
212-
--hash=sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07 \
213-
--hash=sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2
214-
# via sphinx
215-
sphinxcontrib-jsmath==1.0.1 \
216-
--hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178 \
217-
--hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8
218-
# via sphinx
219-
sphinxcontrib-qthelp==1.0.3 \
220-
--hash=sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72 \
221-
--hash=sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6
222-
# via sphinx
223-
sphinxcontrib-serializinghtml==1.1.5 \
224-
--hash=sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd \
225-
--hash=sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952
226-
# via sphinx
22789
urllib3==1.25.11 \
22890
--hash=sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2 \
22991
--hash=sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e
230-
# via
231-
# botocore
232-
# requests
92+
# via botocore
23393
yamllint==1.26.3 \
23494
--hash=sha256:3934dcde484374596d6b52d8db412929a169f6d9e52e20f9ade5bf3523d9b96e
23595
# via -r requirements.in
23696

23797
# The following packages are considered to be unsafe in a requirements file:
238-
setuptools==58.2.0 \
239-
--hash=sha256:2551203ae6955b9876741a26ab3e767bb3242dafe86a32a749ea0d78b6792f11 \
240-
--hash=sha256:2c55bdb85d5bb460bd2e3b12052b677879cffcf46c0c688f2e5bf51d36001145
98+
setuptools==59.6.0 \
99+
--hash=sha256:22c7348c6d2976a52632c67f7ab0cdf40147db7789f9aed18734643fe9cf3373 \
100+
--hash=sha256:4ce92f1e1f8f01233ee9952c04f6b81d1e02939d6e1b488428154974a4d0783e
241101
# via
242-
# sphinx
102+
# -r requirements.in
243103
# yamllint

‎examples/pip_parse/BUILD

Copy file name to clipboardExpand all lines: examples/pip_parse/BUILD
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ py_test(
5050
# For pip dependencies which have entry points, the `entry_point` macro can be
5151
# used from the generated `pip_parse` repository to access a runnable binary.
5252

53-
alias(
54-
name = "sphinx-build",
55-
actual = entry_point(
56-
pkg = "sphinx",
57-
script = "sphinx-build",
58-
),
59-
)
60-
6153
alias(
6254
name = "yamllint",
6355
actual = entry_point("yamllint"),
@@ -76,13 +68,11 @@ py_test(
7668
name = "pip_parse_test",
7769
srcs = ["pip_parse_test.py"],
7870
data = [
79-
":sphinx-build",
8071
":yamllint",
8172
data_requirement("s3cmd"),
8273
dist_info_requirement("requests"),
8374
],
8475
env = {
85-
"SPHINX_BUILD_ENTRY_POINT": "$(rootpath :sphinx-build)",
8676
"WHEEL_DATA_CONTENTS": "$(rootpaths {})".format(data_requirement("s3cmd")),
8777
"WHEEL_DIST_INFO_CONTENTS": "$(rootpaths {})".format(dist_info_requirement("requests")),
8878
"YAMLLINT_ENTRY_POINT": "$(rootpath :yamllint)",

‎examples/pip_parse/pip_parse_test.py

Copy file name to clipboardExpand all lines: examples/pip_parse/pip_parse_test.py
+1-40Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class PipInstallTest(unittest.TestCase):
1212
maxDiff = None
1313

14-
def test_entry_point_void_return(self):
14+
def test_entry_point(self):
1515
env = os.environ.get("YAMLLINT_ENTRY_POINT")
1616
self.assertIsNotNone(env)
1717

@@ -29,45 +29,6 @@ def test_entry_point_void_return(self):
2929
)
3030
self.assertEqual(proc.stdout.decode("utf-8").strip(), "yamllint 1.26.3")
3131

32-
# yamllint entry_point is of the form `def run(argv=None):`
33-
with self.assertRaises(subprocess.CalledProcessError) as context:
34-
subprocess.run(
35-
[entry_point, "--option-does-not-exist"],
36-
check=True,
37-
stdout=subprocess.PIPE,
38-
stderr=subprocess.PIPE,
39-
)
40-
self.assertIn("returned non-zero exit status 2", str(context.exception))
41-
42-
def test_entry_point_int_return(self):
43-
env = os.environ.get("SPHINX_BUILD_ENTRY_POINT")
44-
self.assertIsNotNone(env)
45-
46-
r = runfiles.Create()
47-
48-
# To find an external target, this must use `{workspace_name}/$(rootpath @external_repo//:target)`
49-
entry_point = Path(r.Rlocation("rules_python_pip_parse_example/{}".format(env)))
50-
self.assertTrue(entry_point.exists())
51-
52-
proc = subprocess.run(
53-
[entry_point, "--version"],
54-
check=True,
55-
stdout=subprocess.PIPE,
56-
stderr=subprocess.PIPE,
57-
)
58-
# sphinx-build uses args[0] for its name, only assert the version here
59-
self.assertTrue(proc.stdout.decode("utf-8").strip().endswith("4.2.0"))
60-
61-
# sphinx-build entry_point is of the form `def main(argv: List[str] = sys.argv[1:]) -> int:`
62-
with self.assertRaises(subprocess.CalledProcessError) as context:
63-
subprocess.run(
64-
[entry_point, "--option-does-not-exist"],
65-
check=True,
66-
stdout=subprocess.PIPE,
67-
stderr=subprocess.PIPE,
68-
)
69-
self.assertIn("returned non-zero exit status 2", str(context.exception))
70-
7132
def test_data(self):
7233
env = os.environ.get("WHEEL_DATA_CONTENTS")
7334
self.assertIsNotNone(env)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.