ConfigArgParse icon indicating copy to clipboard operation
ConfigArgParse copied to clipboard

Adds pyproject.toml

Open kingbuzzman opened this issue 6 months ago • 7 comments

Please squash

Tangentially related to https://github.com/bw2/ConfigArgParse/pull/325

  • Adds pyproject.toml
  • Removes the ability to run custom command from setup.py that have been deprecated since 2017.
    • such as "coverage" and "publish" that are now done via github action
  • Makes pyproject.toml the source of truth from setup.py's perspective by adding a TERRIBLE toml parser that works just with what we currently have. This would avoid of keeping the changes aligned. My justification for this is: hopefully we will remove setup.py soon-ish when older versions of python are dropped, AND this whole file can just be deleted in one go.

kingbuzzman avatar Jul 03 '25 10:07 kingbuzzman

I have already addressed this in PR #625. I'm not going to review and approve a duplicate PR.

tbooth avatar Jul 03 '25 11:07 tbooth

have already addressed this in PR #625. I'm not going to review and approve a duplicate PR.

@tbooth This is not a duplicate PR, there is some overlap, but PR #325 is using setup.cfg as that is a step in the wrong direction. This is moving forward, not sideways while maintaining backwards compatibility.

kingbuzzman avatar Jul 03 '25 12:07 kingbuzzman

@kingbuzzman you are clearly working from a different set of guidelines than I am seeing. I'm following the setuptools user guide:

https://setuptools.pypa.io/en/latest/userguide/declarative_config.html

Where are you getting your info from, please?

tbooth avatar Jul 03 '25 13:07 tbooth

https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

From my own tests (see CI) it works with 3.6+, the 3.8 mentioned in their page is just that there is no more support for anything under 3.8 according to python itself. My only issue with just doing inside setup.py:

from setuptools import setup
setup()

is that when you do pip install -e '.[test]'; pip list it shows the package as UNKNOWN 1.0.0-dev -- and I didn't like it... but if you don't care for it, i can just replace setup.py with just that. Surprisingly, it works well/as expected with pip install . and python setup.py

kingbuzzman avatar Jul 03 '25 14:07 kingbuzzman

I still don't see how keeping any setup.py script is necessary or helpful in a modern module, and to my mind this is still an inferior/hacky version of what I already tested and suggested. Perhaps someone more familiar with this packaging approach can step in and comment, as I'm not going to have the time to try and work out what is going on here before next week at the latest.

tbooth avatar Jul 03 '25 14:07 tbooth

[why] keeping any setup.py script is necessary

only for 3.6


See this script for python 3.6:

rm -f setup.py       # This is why setup.py is neeeded!!!! Note we are deleting it here
scripts=(
  "pip install ."
  "python setup.py install"
  "pip install -e ."
  "pip install -e '.[test]'"
)
for script in "${scripts[@]}"; do
  echo "==== Running: $script ===="
  docker run -it --rm -w /app -v "$(pwd)":/app python:3.6 bash -c "$script"
done

output:

==== Running: pip install . ====
Processing /app
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (PEP 517) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-0.0.0-py3-none-any.whl size=1793 sha256=4a28b4a112f2fa250b11adac43f1bcf1b15cac0238bd3129dc10623a8308a9f9
  Stored in directory: /tmp/pip-ephem-wheel-cache-ypqgolmg/wheels/4d/48/a1/0828bbfd678d85c2dad58b3179b32e0ed988f77ac049f25239
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.0.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
==== Running: python setup.py install ====
python: can't open file 'setup.py': [Errno 2] No such file or directory
==== Running: pip install -e . ====
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /app
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
==== Running: pip install -e '.[test]' ====
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /app
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

Note: the only pip install . works, everything else fails, also, note the name i mentioned earlier: Successfully installed UNKNOWN-0.0.0


if we run the EXACT script in 3.7, we get this output:

==== Running: pip install . ====
Processing /app
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: ConfigArgParse
  Building wheel for ConfigArgParse (pyproject.toml) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-py3-none-any.whl size=25754 sha256=1d9d6d90207c0b5a09aabff5a5a91ef8f5a97735ecfcd78accfd0f5506bb790e
  Stored in directory: /tmp/pip-ephem-wheel-cache-6zt6mycx/wheels/90/c9/1b/d2f1956f0bc095b0c25eac5d30a69f0db4be675033bac3fd0c
Successfully built ConfigArgParse
Installing collected packages: ConfigArgParse
Successfully installed ConfigArgParse-1.7.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
==== Running: python setup.py install ====
python: can't open file 'setup.py': [Errno 2] No such file or directory
==== Running: pip install -e . ====
Obtaining file:///app
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: ConfigArgParse
  Building editable for ConfigArgParse (pyproject.toml) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-0.editable-py3-none-any.whl size=10957 sha256=88f9aec106f9d873848dc64fc349619be34baac769e69d134dd5f48bbd43622e
  Stored in directory: /tmp/pip-ephem-wheel-cache-s4dtbyyy/wheels/90/c9/1b/d2f1956f0bc095b0c25eac5d30a69f0db4be675033bac3fd0c
Successfully built ConfigArgParse
Installing collected packages: ConfigArgParse
Successfully installed ConfigArgParse-1.7.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
==== Running: pip install -e '.[test]' ====
Obtaining file:///app
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting mock
  Downloading mock-5.2.0-py3-none-any.whl (31 kB)
Collecting pytest
  Downloading pytest-7.4.4-py3-none-any.whl (325 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 325.3/325.3 kB 2.2 MB/s eta 0:00:00
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting black
  Downloading black-23.3.0-py3-none-any.whl (180 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.0/181.0 kB 13.3 MB/s eta 0:00:00
Collecting pytest-cov
  Downloading pytest_cov-4.1.0-py3-none-any.whl (21 kB)
Collecting PyYAML
  Downloading PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (658 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 658.4/658.4 kB 21.9 MB/s eta 0:00:00
Collecting tomli>=1.1.0
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting pathspec>=0.9.0
  Downloading pathspec-0.11.2-py3-none-any.whl (29 kB)
Collecting typing-extensions>=3.10.0.0
  Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Collecting click>=8.0.0
  Downloading click-8.1.8-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.2/98.2 kB 17.1 MB/s eta 0:00:00
Collecting mypy-extensions>=0.4.3
  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting typed-ast>=1.4.2
  Downloading typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (793 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 793.5/793.5 kB 59.5 MB/s eta 0:00:00
Collecting packaging>=22.0
  Downloading packaging-24.0-py3-none-any.whl (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 8.0 MB/s eta 0:00:00
Collecting platformdirs>=2
  Downloading platformdirs-4.0.0-py3-none-any.whl (17 kB)
Collecting importlib-metadata>=0.12
  Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Collecting iniconfig
  Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.2.0-py3-none-any.whl (17 kB)
Collecting exceptiongroup>=1.0.0rc8
  Downloading exceptiongroup-1.3.0-py3-none-any.whl (16 kB)
Collecting coverage[toml]>=5.2.1
  Downloading coverage-7.2.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (226 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 226.2/226.2 kB 35.6 MB/s eta 0:00:00
Collecting zipp>=0.5
  Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Building wheels for collected packages: ConfigArgParse
  Building editable for ConfigArgParse (pyproject.toml) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-0.editable-py3-none-any.whl size=10957 sha256=5ffca1c438214b0e3a7e185b09c15b207c2df6657d5c4292b27d623a0c91e5de
  Stored in directory: /tmp/pip-ephem-wheel-cache-778mcqab/wheels/90/c9/1b/d2f1956f0bc095b0c25eac5d30a69f0db4be675033bac3fd0c
Successfully built ConfigArgParse
Installing collected packages: zipp, typing-extensions, typed-ast, tomli, toml, PyYAML, pathspec, packaging, mypy-extensions, mock, iniconfig, coverage, ConfigArgParse, platformdirs, importlib-metadata, exceptiongroup, pluggy, click, pytest, black, pytest-cov
Successfully installed ConfigArgParse-1.7.1 PyYAML-6.0.1 black-23.3.0 click-8.1.8 coverage-7.2.7 exceptiongroup-1.3.0 importlib-metadata-6.7.0 iniconfig-2.0.0 mock-5.2.0 mypy-extensions-1.0.0 packaging-24.0 pathspec-0.11.2 platformdirs-4.0.0 pluggy-1.2.0 pytest-7.4.4 pytest-cov-4.1.0 toml-0.10.2 tomli-2.0.1 typed-ast-1.5.5 typing-extensions-4.7.1 zipp-3.15.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

Note: only the python setup.py install fails, as expected because we deleted the file at the very top.


now if we remove the rm -f setup.py from the script (first line), and doing a git checkout -- . to set it back to "normal", in this PR.

Here is 3.6 running normally:

==== Running: pip install . ====
Processing /app
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: ConfigArgParse
  Building wheel for ConfigArgParse (PEP 517) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-py3-none-any.whl size=25739 sha256=79c9078c2754766c65a3fa61005b7c0482c29fb9bf8e32a9c58b8b7376e40c10
  Stored in directory: /tmp/pip-ephem-wheel-cache-slk_00nc/wheels/4d/48/a1/0828bbfd678d85c2dad58b3179b32e0ed988f77ac049f25239
Successfully built ConfigArgParse
Installing collected packages: ConfigArgParse
Successfully installed ConfigArgParse-1.7.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
==== Running: python setup.py install ====
running install
running bdist_egg
running egg_info
writing ConfigArgParse.egg-info/PKG-INFO
writing dependency_links to ConfigArgParse.egg-info/dependency_links.txt
writing requirements to ConfigArgParse.egg-info/requires.txt
writing top-level names to ConfigArgParse.egg-info/top_level.txt
reading manifest file 'ConfigArgParse.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'ConfigArgParse.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
creating build/bdist.linux-aarch64/egg
copying build/lib/configargparse.py -> build/bdist.linux-aarch64/egg
byte-compiling build/bdist.linux-aarch64/egg/configargparse.py to configargparse.cpython-36.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/PKG-INFO -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/SOURCES.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/dependency_links.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/requires.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/top_level.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/ConfigArgParse-1.7.1-py3.6.egg' and adding 'build/bdist.linux-aarch64/egg' to it
removing 'build/bdist.linux-aarch64/egg' (and everything under it)
Processing ConfigArgParse-1.7.1-py3.6.egg
Copying ConfigArgParse-1.7.1-py3.6.egg to /usr/local/lib/python3.6/site-packages
Adding ConfigArgParse 1.7.1 to easy-install.pth file

Installed /usr/local/lib/python3.6/site-packages/ConfigArgParse-1.7.1-py3.6.egg
Processing dependencies for ConfigArgParse==1.7.1
Finished processing dependencies for ConfigArgParse==1.7.1
==== Running: pip install -e . ====
Obtaining file:///app
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Installing collected packages: ConfigArgParse
  Running setup.py develop for ConfigArgParse
Successfully installed ConfigArgParse-1.7.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
==== Running: pip install -e '.[test]' ====
Obtaining file:///app
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Collecting PyYAML
  Downloading PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (669 kB)
     |████████████████████████████████| 669 kB 3.3 MB/s 
Collecting pytest-cov
  Downloading pytest_cov-4.0.0-py3-none-any.whl (21 kB)
Collecting pytest
  Downloading pytest-7.0.1-py3-none-any.whl (296 kB)
     |████████████████████████████████| 296 kB 24.2 MB/s 
Collecting mock
  Downloading mock-5.2.0-py3-none-any.whl (31 kB)
Collecting black
  Downloading black-22.8.0-py3-none-any.whl (159 kB)
     |████████████████████████████████| 159 kB 178.6 MB/s 
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting platformdirs>=2
  Downloading platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting typing-extensions>=3.10.0.0
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting pathspec>=0.9.0
  Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting dataclasses>=0.6
  Downloading dataclasses-0.8-py3-none-any.whl (19 kB)
Collecting tomli>=1.1.0
  Downloading tomli-1.2.3-py3-none-any.whl (12 kB)
Collecting click>=8.0.0
  Downloading click-8.0.4-py3-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 8.7 MB/s 
Collecting typed-ast>=1.4.2
  Downloading typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (793 kB)
     |████████████████████████████████| 793 kB 49.4 MB/s 
Collecting mypy-extensions>=0.4.3
  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting importlib-metadata
  Downloading importlib_metadata-4.8.3-py3-none-any.whl (17 kB)
Collecting zipp>=0.5
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
Collecting packaging
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     |████████████████████████████████| 40 kB 5.2 MB/s 
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting iniconfig
  Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting py>=1.8.2
  Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
     |████████████████████████████████| 98 kB 12.1 MB/s 
Collecting attrs>=19.2.0
  Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
     |████████████████████████████████| 60 kB 7.8 MB/s 
Collecting pyparsing!=3.0.5,>=2.0.2
  Downloading pyparsing-3.1.4-py3-none-any.whl (104 kB)
     |████████████████████████████████| 104 kB 138.2 MB/s 
Collecting coverage[toml]>=5.2.1
  Downloading coverage-6.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (204 kB)
     |████████████████████████████████| 204 kB 113.9 MB/s 
Installing collected packages: zipp, typing-extensions, pyparsing, importlib-metadata, tomli, py, pluggy, packaging, iniconfig, coverage, attrs, typed-ast, pytest, platformdirs, pathspec, mypy-extensions, dataclasses, click, toml, PyYAML, pytest-cov, mock, ConfigArgParse, black
  Running setup.py develop for ConfigArgParse
Successfully installed ConfigArgParse-1.7.1 PyYAML-6.0.1 attrs-22.2.0 black-22.8.0 click-8.0.4 coverage-6.2 dataclasses-0.8 importlib-metadata-4.8.3 iniconfig-1.1.1 mock-5.2.0 mypy-extensions-1.0.0 packaging-21.3 pathspec-0.9.0 platformdirs-2.4.0 pluggy-1.0.0 py-1.11.0 pyparsing-3.1.4 pytest-7.0.1 pytest-cov-4.0.0 toml-0.10.2 tomli-1.2.3 typed-ast-1.5.5 typing-extensions-4.1.1 zipp-3.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

Here is 3.7 running normally:

==== Running: pip install . ====
Processing /app
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: ConfigArgParse
  Building wheel for ConfigArgParse (pyproject.toml) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-py3-none-any.whl size=25761 sha256=31dd12f256d1e300ae7ac7b6c078fbff8bda4b5830df2e727899eaf154dea200
  Stored in directory: /tmp/pip-ephem-wheel-cache-8m26a08g/wheels/90/c9/1b/d2f1956f0bc095b0c25eac5d30a69f0db4be675033bac3fd0c
Successfully built ConfigArgParse
Installing collected packages: ConfigArgParse
Successfully installed ConfigArgParse-1.7.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
==== Running: python setup.py install ====
running install
running bdist_egg
running egg_info
writing ConfigArgParse.egg-info/PKG-INFO
writing dependency_links to ConfigArgParse.egg-info/dependency_links.txt
writing requirements to ConfigArgParse.egg-info/requires.txt
writing top-level names to ConfigArgParse.egg-info/top_level.txt
reading manifest file 'ConfigArgParse.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'ConfigArgParse.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
creating build/bdist.linux-aarch64/egg
copying build/lib/configargparse.py -> build/bdist.linux-aarch64/egg
byte-compiling build/bdist.linux-aarch64/egg/configargparse.py to configargparse.cpython-37.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/PKG-INFO -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/SOURCES.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/dependency_links.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/requires.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying ConfigArgParse.egg-info/top_level.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/ConfigArgParse-1.7.1-py3.7.egg' and adding 'build/bdist.linux-aarch64/egg' to it
removing 'build/bdist.linux-aarch64/egg' (and everything under it)
Processing ConfigArgParse-1.7.1-py3.7.egg
Copying ConfigArgParse-1.7.1-py3.7.egg to /usr/local/lib/python3.7/site-packages
Adding ConfigArgParse 1.7.1 to easy-install.pth file

Installed /usr/local/lib/python3.7/site-packages/ConfigArgParse-1.7.1-py3.7.egg
Processing dependencies for ConfigArgParse==1.7.1
Finished processing dependencies for ConfigArgParse==1.7.1
==== Running: pip install -e . ====
Obtaining file:///app
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: ConfigArgParse
  Building editable for ConfigArgParse (pyproject.toml) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-0.editable-py3-none-any.whl size=10961 sha256=648e05285e49f427eaf927e4f084f3799e6bf1a280bfb60fa027b98a46f325df
  Stored in directory: /tmp/pip-ephem-wheel-cache-b4xeovug/wheels/90/c9/1b/d2f1956f0bc095b0c25eac5d30a69f0db4be675033bac3fd0c
Successfully built ConfigArgParse
Installing collected packages: ConfigArgParse
Successfully installed ConfigArgParse-1.7.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
==== Running: pip install -e '.[test]' ====
Obtaining file:///app
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting black
  Downloading black-23.3.0-py3-none-any.whl (180 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.0/181.0 kB 4.0 MB/s eta 0:00:00
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting mock
  Downloading mock-5.2.0-py3-none-any.whl (31 kB)
Collecting pytest-cov
  Downloading pytest_cov-4.1.0-py3-none-any.whl (21 kB)
Collecting pytest
  Downloading pytest-7.4.4-py3-none-any.whl (325 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 325.3/325.3 kB 11.4 MB/s eta 0:00:00
Collecting PyYAML
  Downloading PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (658 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 658.4/658.4 kB 23.8 MB/s eta 0:00:00
Collecting packaging>=22.0
  Downloading packaging-24.0-py3-none-any.whl (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 10.7 MB/s eta 0:00:00
Collecting pathspec>=0.9.0
  Downloading pathspec-0.11.2-py3-none-any.whl (29 kB)
Collecting typing-extensions>=3.10.0.0
  Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Collecting tomli>=1.1.0
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting click>=8.0.0
  Downloading click-8.1.8-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.2/98.2 kB 21.8 MB/s eta 0:00:00
Collecting mypy-extensions>=0.4.3
  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting typed-ast>=1.4.2
  Downloading typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (793 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 793.5/793.5 kB 77.2 MB/s eta 0:00:00
Collecting platformdirs>=2
  Downloading platformdirs-4.0.0-py3-none-any.whl (17 kB)
Collecting exceptiongroup>=1.0.0rc8
  Downloading exceptiongroup-1.3.0-py3-none-any.whl (16 kB)
Collecting importlib-metadata>=0.12
  Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Collecting iniconfig
  Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.2.0-py3-none-any.whl (17 kB)
Collecting coverage[toml]>=5.2.1
  Downloading coverage-7.2.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (226 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 226.2/226.2 kB 36.1 MB/s eta 0:00:00
Collecting zipp>=0.5
  Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Building wheels for collected packages: ConfigArgParse
  Building editable for ConfigArgParse (pyproject.toml) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1-0.editable-py3-none-any.whl size=10961 sha256=0497c7452ec9b48f030ac2d07edc1d3b53f946cfd74c773333611b439e23da4e
  Stored in directory: /tmp/pip-ephem-wheel-cache-ik2dks9_/wheels/90/c9/1b/d2f1956f0bc095b0c25eac5d30a69f0db4be675033bac3fd0c
Successfully built ConfigArgParse
Installing collected packages: zipp, typing-extensions, typed-ast, tomli, toml, PyYAML, pathspec, packaging, mypy-extensions, mock, iniconfig, coverage, ConfigArgParse, platformdirs, importlib-metadata, exceptiongroup, pluggy, click, pytest, black, pytest-cov
Successfully installed ConfigArgParse-1.7.1 PyYAML-6.0.1 black-23.3.0 click-8.1.8 coverage-7.2.7 exceptiongroup-1.3.0 importlib-metadata-6.7.0 iniconfig-2.0.0 mock-5.2.0 mypy-extensions-1.0.0 packaging-24.0 pathspec-0.11.2 platformdirs-4.0.0 pluggy-1.2.0 pytest-7.4.4 pytest-cov-4.1.0 toml-0.10.2 tomli-2.0.1 typed-ast-1.5.5 typing-extensions-4.7.1 zipp-3.15.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

Note that both 3.6 and 3.7 work as expected on their "normal runs"

kingbuzzman avatar Jul 03 '25 16:07 kingbuzzman

@tbooth For reference, I checkout'ed your branch and ran the same script, and it passed... well, all but the setup.py because you dont have one. I think the major difference between mine solution and yours is:

  1. I'm putting the source of truth in pyproject.toml the new python standard. You're using setup.cfg which has NOT been deprecated, but it is being faded into obscurity, see django repo, no setup.cfg, WITH a pyproject.toml, see flask, same thing, .... examples galore! All modern packages are removing setup.cfg from their repos... as well as setup.py. The only reason we need it is because of 3.6, and as soon as that gets dropped, we can delete a single file and not touch anything else.

here is your PR's output:

==== Running: pip install . ====
Processing /app
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting PyYAML
  Downloading PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (669 kB)
     |████████████████████████████████| 669 kB 2.7 MB/s 
Building wheels for collected packages: ConfigArgParse
  Building wheel for ConfigArgParse (PEP 517) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.7.1.post25+git.a7aaba38.dirty-py3-none-any.whl size=38464 sha256=205f3504eda7b1fd5606177ee2d997d06ac947e7d1d24e51116e9a023b41cb9e
  Stored in directory: /tmp/pip-ephem-wheel-cache-5r69_b5g/wheels/4d/48/a1/0828bbfd678d85c2dad58b3179b32e0ed988f77ac049f25239
Successfully built ConfigArgParse
Installing collected packages: PyYAML, ConfigArgParse
Successfully installed ConfigArgParse-1.7.1.post25+git.a7aaba38.dirty PyYAML-6.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
==== Running: python setup.py install ====
python: can't open file 'setup.py': [Errno 2] No such file or directory
==== Running: pip install -e . ====
Obtaining file:///app
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting PyYAML
  Downloading PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (669 kB)
     |████████████████████████████████| 669 kB 4.3 MB/s 
Installing collected packages: PyYAML, ConfigArgParse
  Running setup.py develop for ConfigArgParse
Successfully installed ConfigArgParse-1.7.1.post25+git.a7aaba38.dirty PyYAML-6.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
==== Running: pip install -e '.[test]' ====
Obtaining file:///app
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting PyYAML
  Downloading PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (669 kB)
     |████████████████████████████████| 669 kB 3.2 MB/s 
Collecting pytest
  Downloading pytest-7.0.1-py3-none-any.whl (296 kB)
     |████████████████████████████████| 296 kB 24.4 MB/s 
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting pytest-cov
  Downloading pytest_cov-4.0.0-py3-none-any.whl (21 kB)
Collecting py>=1.8.2
  Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
     |████████████████████████████████| 98 kB 10.5 MB/s 
Collecting importlib-metadata>=0.12
  Downloading importlib_metadata-4.8.3-py3-none-any.whl (17 kB)
Collecting tomli>=1.0.0
  Downloading tomli-1.2.3-py3-none-any.whl (12 kB)
Collecting attrs>=19.2.0
  Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
     |████████████████████████████████| 60 kB 8.9 MB/s 
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting iniconfig
  Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting typing-extensions>=3.6.4
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting zipp>=0.5
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.1.4-py3-none-any.whl (104 kB)
Collecting coverage[toml]>=5.2.1
  Downloading coverage-6.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (204 kB)
     |████████████████████████████████| 204 kB 33.6 MB/s 
Installing collected packages: zipp, typing-extensions, pyparsing, importlib-metadata, tomli, py, pluggy, packaging, iniconfig, coverage, attrs, PyYAML, pytest, toml, pytest-cov, ConfigArgParse
  Running setup.py develop for ConfigArgParse
Successfully installed ConfigArgParse-1.7.1.post25+git.a7aaba38.dirty PyYAML-6.0.1 attrs-22.2.0 coverage-6.2 importlib-metadata-4.8.3 iniconfig-1.1.1 packaging-21.3 pluggy-1.0.0 py-1.11.0 pyparsing-3.1.4 pytest-7.0.1 pytest-cov-4.0.0 toml-0.10.2 tomli-1.2.3 typing-extensions-4.1.1 zipp-3.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

kingbuzzman avatar Jul 03 '25 16:07 kingbuzzman