Marcel Telka
2024-04-04 834d7fee7f0aa9bf834784cfaa5c7693f1547c42
commit | author | age
a6c478 1 #
MT 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
5 # 1.0 of the CDDL.
6 #
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.
10 #
11
12 #
13 # This file was automatically generated using the following command:
14 #   $WS_TOOLS/python-integrate-project libcst
15 #
16
17 BUILD_STYLE = pyproject
18
19 include ../../../make-rules/shared-macros.mk
20
21 COMPONENT_NAME =        libcst
834d7f 22 HUMAN_VERSION =            1.3.1
4cc83d 23 COMPONENT_SUMMARY =        libcst - A concrete syntax tree with AST-like properties for Python 3.0 through 3.12 programs.
a6c478 24 COMPONENT_ARCHIVE_HASH =    \
834d7f 25     sha256:03b1df1ae02456f1d465fcd5ead1d0d454bb483caefd8c8e6bde515ffdb53d1b
a6c478 26 COMPONENT_LICENSE =        MIT OR PSF-2.0
MT 27 COMPONENT_LICENSE_FILE =    LICENSE
28
29 TEST_STYLE = pytest
30
31 include $(WS_MAKE_RULES)/common.mk
32
33 # https://www.illumos.org/issues/15767
34 LD_Z_IGNORE=
35
36 #
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.
45 #
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
49 # testing.
50 #
51 # To workaround this we rename the main module in the build directory during
52 # testing so Python will need to defer to PYTHONPATH.
53 #
54 COMPONENT_PRE_TEST_ACTION +=    $(MV) $(@D)/libcst $(@D)/libcst-RENAMED ;
55 COMPONENT_POST_TEST_ACTION +=    $(MV) $(@D)/libcst-RENAMED $(@D)/libcst ;
56
4cc83d 57 # Tests in tests/test_fuzz.py require hypothesmith.  We do not have
MT 58 # hypothesmith package (yet) so we need to disable those tests.
59 PYTEST_ADDOPTS += --ignore libcst-RENAMED/tests/test_fuzz.py
60
61 # https://github.com/Instagram/LibCST/issues/818
62 PYTEST_ADDOPTS += --ignore libcst-RENAMED/codegen/tests/test_codegen_clean.py
63
64 # Remove extra -RENAMED from test report
65 COMPONENT_TEST_TRANSFORMS += "-e 's/\(libcst\)-RENAMED/\1/g'"
a6c478 66
MT 67 # Auto-generated dependencies
68 PYTHON_REQUIRED_PACKAGES += library/python/pyyaml
69 PYTHON_REQUIRED_PACKAGES += library/python/setuptools
70 PYTHON_REQUIRED_PACKAGES += library/python/setuptools-rust
71 PYTHON_REQUIRED_PACKAGES += library/python/setuptools-scm
72 PYTHON_REQUIRED_PACKAGES += library/python/wheel
73 PYTHON_REQUIRED_PACKAGES += runtime/python
74 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
75 REQUIRED_PACKAGES += system/library