| 
14 | 14 | 
 
  | 
15 | 15 | case "$SYSTEM" in  | 
16 | 16 |     install-requires)  | 
17 |  | -        # Collect from src/pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format  | 
 | 17 | +        # Collect from pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format  | 
18 | 18 |         # needed by setup.cfg [options] install_requires=  | 
19 |  | -        SYSTEM_PACKAGES_FILE_NAMES="src/pyproject.toml version_requirements.txt requirements.txt"  | 
 | 19 | +        SYSTEM_PACKAGES_FILE_NAMES="pyproject.toml version_requirements.txt requirements.txt"  | 
20 | 20 |         # also normalizes quotes from "" to ''.  | 
21 | 21 |         STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;s/\"/'/g;"  | 
22 | 22 |         COLLECT=  | 
23 | 23 |         ;;  | 
24 | 24 |     install-requires-toml)  | 
25 |  | -        # Collect from src/pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format  | 
 | 25 | +        # Collect from pyproject.toml or from version_requirements.txt (falling back to requirements.txt) and output it in the format  | 
26 | 26 |         # needed by pyproject.toml [build-system] requires=  | 
27 |  | -        SYSTEM_PACKAGES_FILE_NAMES="src/pyproject.toml version_requirements.txt requirements.txt"  | 
 | 27 | +        SYSTEM_PACKAGES_FILE_NAMES="pyproject.toml version_requirements.txt requirements.txt"  | 
28 | 28 |         # also normalizes quotes from '' to "".  | 
29 | 29 |         STRIP_COMMENTS="sed s/#.*//;/^[[:space:]]*$/d;s/'/\"/g;s/^/'/;s/$/',/;"  | 
30 | 30 |         COLLECT=  | 
31 | 31 |         ;;  | 
32 | 32 |     pip)  | 
33 |  | -        SYSTEM_PACKAGES_FILE_NAMES="requirements.txt src/pyproject.toml version_requirements.txt"  | 
 | 33 | +        SYSTEM_PACKAGES_FILE_NAMES="requirements.txt pyproject.toml version_requirements.txt"  | 
34 | 34 |         STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;'  | 
35 | 35 |         COLLECT=echo  | 
36 | 36 |         ;;  | 
37 | 37 |     versions)  | 
38 | 38 |         # For use in sage-spkg-info  | 
39 |  | -        SYSTEM_PACKAGES_FILE_NAMES="package-version.txt requirements.txt src/pyproject.toml version_requirements.txt"  | 
 | 39 | +        SYSTEM_PACKAGES_FILE_NAMES="package-version.txt requirements.txt pyproject.toml version_requirements.txt"  | 
40 | 40 |         strip_comments () {  | 
41 | 41 |             TEXT=$(sed "s/#.*//;/^[[:space:]]*$/d;s/\"/'/g;s/^/    /;" "$@")  | 
42 | 42 |             if [ -n "$(echo $TEXT)" ]; then  | 
@@ -101,9 +101,9 @@ for PKG_BASE in $SPKGS; do  | 
101 | 101 |             *pyproject.toml)  | 
102 | 102 |                 SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/$NAME  | 
103 | 103 |                 if [ -f "$SYSTEM_PACKAGES_FILE" ]; then  | 
104 |  | -                    # Extract from the "requires" block in src/pyproject.toml  | 
 | 104 | +                    # Extract from the "requires" block in pyproject.toml  | 
105 | 105 |                     # Packages are in the format "'sage-conf ~= 10.3b3',"  | 
106 |  | -                    PACKAGE_INFO=$(sed -n '/requires *= *\[/,/^\]/s/^ *'\''\('$PKG_BASE'.*\)'\'',/\1/p' "$SAGE_ROOT/src/pyproject.toml")  | 
 | 106 | +                    PACKAGE_INFO=$(sed -n '/requires *= *\[/,/^\]/s/^ *'\''\('$PKG_BASE'.*\)'\'',/\1/p' "$SAGE_ROOT/pyproject.toml")  | 
107 | 107 |                     if [ -n "$PACKAGE_INFO" ]; then  | 
108 | 108 |                         echo "$PACKAGE_INFO" | ${STRIP_COMMENTS}  | 
109 | 109 |                         [ $SYSTEM = versions ] || break  | 
 | 
0 commit comments