reubano / csv2ofx

A Python library and command line tool for converting csv to ofx and qif files
MIT License
199 stars 113 forks source link

Project fails to install from source #86

Closed jaraco closed 2 years ago

jaraco commented 2 years ago

Attempting to install the package from source fails:

~ $ py -3.8 -m venv ~/.envs/csv2ofx
~ $ ~/.envs/csv2ofx/bin/pip install git+https://github.com/reubano/csv2ofx
Collecting git+https://github.com/reubano/csv2ofx
  Cloning https://github.com/reubano/csv2ofx to /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-tknjpf06
  Running command git clone -q https://github.com/reubano/csv2ofx /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-tknjpf06
    ERROR: Command errored out with exit status 1:
     command: /Users/jaraco/.envs/csv2ofx/bin/python3.8 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-tknjpf06/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-tknjpf06/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-yjr1x133
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-tknjpf06/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-req-build-tknjpf06/setup.py", line 10, in <module>
        import pkutils
    ModuleNotFoundError: No module named 'pkutils'
    ----------------------------------------
WARNING: Discarding git+https://github.com/reubano/csv2ofx. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 21.1.1; however, version 21.3.1 is available.
You should consider upgrading via the '/Users/jaraco/.envs/csv2ofx/bin/python3.8 -m pip install --upgrade pip' command.

That's because pkutils, although declared as a setup_requires dependency, can't be deduced until setup.py is invoked, but pkutils is required to invoke setup.py.

The packaging ecosystem has a solution for this problem, which is PEP 518 build dependencies.