2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # This file was automatically generated using the following command:
14 # $WS_TOOLS/python-integrate-project libcst
17 BUILD_STYLE
= pyproject
19 include ..
/..
/..
/make-rules
/shared-macros.mk
21 COMPONENT_NAME
= libcst
23 COMPONENT_SUMMARY
= A concrete syntax tree with AST-like properties for Python
3.0 through
3.13 programs.
24 COMPONENT_ARCHIVE_HASH
= \
25 sha256
:8478abf21ae3861a073e898d80b822bd56e578886331b33129ba77fec05b8c24
26 COMPONENT_LICENSE
= MIT OR PSF-2.0
27 COMPONENT_LICENSE_FILE
= LICENSE
31 include $(WS_MAKE_RULES
)/common.mk
33 # https://www.illumos.org/issues/15767
37 # Tests are run from build directory that contains cloned copy of sdist. We
38 # try to ask Python to find tested modules in the proto area (the PYTHONPATH is
39 # set accordingly), but Python (< 3.11) always adds the current directory to
40 # sys.path and there is no known (simple) way how to avoid that. Except -I,
41 # but that would cause Python to ignore PYTHONPATH too so we would not have
42 # access to the proto area either. The -P option together with PYTHONSAFEPATH
43 # environment variable were added to Python 3.11 only so we cannot use them yet
44 # for all Python versions we support.
46 # Since sdist for this project contains the main module in the top-level
47 # directory we cannot force Python to skip it. But, unfortunately, this module
48 # does not contain built dynamic libraries, so Python cannot find them while
51 # To workaround this we rename the main module in the build directory during
52 # testing so Python will need to defer to PYTHONPATH.
54 COMPONENT_PRE_TEST_ACTION
+= $(MV
) $(@D
)/libcst
$(@D
)/libcst-RENAMED
;
55 COMPONENT_POST_TEST_ACTION
+= $(MV
) $(@D
)/libcst-RENAMED
$(@D
)/libcst
;
57 # Tests in tests/test_fuzz.py require hypothesmith. We do not have
58 # hypothesmith package (yet) so we need to disable those tests.
59 PYTEST_ADDOPTS
+= --ignore libcst-RENAMED
/tests
/test_fuzz.py
61 # https://github.com/Instagram/LibCST/issues/818
62 PYTEST_ADDOPTS
+= --ignore libcst-RENAMED
/codegen
/tests
/test_codegen_clean.py
64 # https://github.com/Instagram/LibCST/issues/1220
65 PYTEST_ADDOPTS
+= --deselect libcst-RENAMED
/codemod
/tests
/test_codemod_cli.py
::TestCodemodCLI
::test_codemod_formatter_error_input
67 # Remove extra -RENAMED from test report
68 COMPONENT_TEST_TRANSFORMS
+= "-e 's/\(libcst\)-RENAMED/\1/g'"
70 # Auto-generated dependencies
71 PYTHON_REQUIRED_PACKAGES
+= library
/python
/pyyaml
72 PYTHON_REQUIRED_PACKAGES
+= library
/python
/setuptools
73 PYTHON_REQUIRED_PACKAGES
+= library
/python
/setuptools-rust
74 PYTHON_REQUIRED_PACKAGES
+= library
/python
/setuptools-scm
75 PYTHON_REQUIRED_PACKAGES
+= library
/python
/wheel
76 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
77 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
78 REQUIRED_PACKAGES
+= system
/library