Skip to content

Commit f048771

Browse files
committed
Pants for CI.
1 parent a80c093 commit f048771

File tree

8 files changed

+54
-29
lines changed

8 files changed

+54
-29
lines changed

BUILD

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
python_requirements()
2+
3+
python_distribution(
4+
name="python-algorithms",
5+
dependencies=[
6+
],
7+
provides=setup_py(
8+
name="python-algorithms",
9+
version="1.0",
10+
description="Python algorithms.",
11+
author="Laurent Luce",
12+
classifiers=[
13+
"Programming Language :: Python :: 3.6",
14+
],
15+
),
16+
setup_py_commands=["sdist", "bdist_wheel", "--python-tag", "py36.py37"]
17+
)

algorithms/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
python_library(
2+
name="algorithms",
3+
sources=["*.py", "!*_test.py"],
4+
interpreter_constraints=[">=3.6"],
5+
)
6+
7+

algorithms/tests/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `sources` defaults to ['*_test.py', 'test_*.py', 'conftest.py'].
2+
# `dependencies` are inferred.
3+
python_tests(name = 'tests')

build-support/.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[flake8]

constraints.txt

Whitespace-only changes.

pants.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[GLOBAL]
2+
pants_version = "2.1.0"
3+
backend_packages = [
4+
"pants.backend.python",
5+
"pants.backend.python.lint.flake8"
6+
]
7+
8+
[source]
9+
# The Python source root is the repo root. See https://www.pantsbuild.org/docs/source-roots.
10+
root_patterns = ["/"]
11+
12+
[python-setup]
13+
# The default interpreter compatibility for code in this repo. Individual targets can override
14+
# this with the `interpreter_constraints` field. See
15+
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.
16+
interpreter_constraints = [">=3.6"]
17+
# Use a constraints file. See https://www.pantsbuild.org/docs/python-third-party-dependencies.
18+
requirement_constraints = "constraints.txt"
19+
# We search for interpreters on both on the $PATH and in the `$(pyenv root)/versions` folder.
20+
# If you're using macOS, you may want to leave off the <PATH> entry to avoid using the
21+
# problematic system Pythons. See
22+
# https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path.
23+
interpreter_search_paths = ["<PATH>", "<PYENV>"]
24+
25+
[flake8]
26+
config = "build-support/.flake8"

requirements.txt

Whitespace-only changes.

setup.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)