Marcel Telka
2023-10-06 475cfae83855e0afcac24cd0fcd0fc446844025e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
 
#
# This file was automatically generated using the following command:
#   $WS_TOOLS/python-integrate-project libcst
#
 
BUILD_STYLE = pyproject
 
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME =        libcst
HUMAN_VERSION =            1.1.0
COMPONENT_SUMMARY =        libcst - A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7, 3.8, 3.9, and 3.10 programs.
COMPONENT_ARCHIVE_URL =        \
    https://files.pythonhosted.org/packages/81/ef/610498b5e982d9dd64f2af8422ece1be44a946a8dbda15d08087e0e1ff08/libcst-1.1.0.tar.gz
COMPONENT_ARCHIVE_HASH =    \
    sha256:0acbacb9a170455701845b7e940e2d7b9519db35a86768d86330a0b0deae1086
COMPONENT_LICENSE =        MIT OR PSF-2.0
COMPONENT_LICENSE_FILE =    LICENSE
 
TEST_STYLE = pytest
 
#
# Following dependency loops were detected (where 'A --> B' means 'A needs B to
# run tests', and 'A ==> B' means 'A needs B for build and/or run'):
#
# libcst --> hypothesmith ==> libcst
#
# To break loops we need to allow this project to integrate without testing in
# a case the required projects are not available yet (bootstrap).
#
PYTHON_TEST_BOOTSTRAP = yes
 
include $(WS_MAKE_RULES)/common.mk
 
# https://www.illumos.org/issues/15767
LD_Z_IGNORE=
 
#
# Tests are run from build directory that contains cloned copy of sdist.  We
# try to ask Python to find tested modules in the proto area (the PYTHONPATH is
# set accordingly), but Python (< 3.11) always adds the current directory to
# sys.path and there is no known (simple) way how to avoid that.  Except -I,
# but that would cause Python to ignore PYTHONPATH too so we would not have
# access to the proto area either.  The -P option together with PYTHONSAFEPATH
# environment variable were added to Python 3.11 only so we cannot use them yet
# for all Python versions we support.
#
# Since sdist for this project contains the main module in the top-level
# directory we cannot force Python to skip it.  But, unfortunately, this module
# does not contain built dynamic libraries, so Python cannot find them while
# testing.
#
# To workaround this we rename the main module in the build directory during
# testing so Python will need to defer to PYTHONPATH.
#
COMPONENT_PRE_TEST_ACTION +=    $(MV) $(@D)/libcst $(@D)/libcst-RENAMED ;
COMPONENT_POST_TEST_ACTION +=    $(MV) $(@D)/libcst-RENAMED $(@D)/libcst ;
 
# We are unable to detect this dependency automatically
TEST_REQUIRED_PACKAGES.python += library/python/hypothesmith
 
# Auto-generated dependencies
PYTHON_REQUIRED_PACKAGES += library/python/pyyaml
PYTHON_REQUIRED_PACKAGES += library/python/setuptools
PYTHON_REQUIRED_PACKAGES += library/python/setuptools-rust
PYTHON_REQUIRED_PACKAGES += library/python/setuptools-scm
PYTHON_REQUIRED_PACKAGES += library/python/typing-extensions
PYTHON_REQUIRED_PACKAGES += library/python/typing-inspect
PYTHON_REQUIRED_PACKAGES += library/python/wheel
PYTHON_REQUIRED_PACKAGES += runtime/python
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
REQUIRED_PACKAGES += system/library