Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make: *** No rule to make target requirements-test.txt', needed by venv-test/touchfile'. Stop. #176

Open
weiweihuanghuang opened this issue Jun 25, 2024 · 7 comments

Comments

@weiweihuanghuang
Copy link

I'm trying to update my Fragment Mono to the latest googlefonts-project-template. So I run make update-project-template then I run make update and I get this error:

test -d venv || python3 -m venv venv
. venv/bin/activate; pip install -Ur requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.in'

So I grab the requirements.in from the latest comit and run it again which updates a bunch of tools then I get this message:

touch venv/touchfile
make: *** No rule to make target `requirements-test.txt', needed by `venv-test/touchfile'.  Stop.

What's that mean?

@weiweihuanghuang
Copy link
Author

weiweihuanghuang commented Jun 25, 2024

Ok I see it means that I need to get the 'requirements-test.txt' and 'requirements-test.in' files from the latest comit. So I grab those and then get this error:

  Building wheel for pycairo (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pycairo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11-x86_64-cpython-310
      creating build/lib.macosx-11-x86_64-cpython-310/cairo
      copying cairo/__init__.py -> build/lib.macosx-11-x86_64-cpython-310/cairo
      copying cairo/__init__.pyi -> build/lib.macosx-11-x86_64-cpython-310/cairo
      copying cairo/py.typed -> build/lib.macosx-11-x86_64-cpython-310/cairo
      running build_ext
      Package 'gobject-2.0' requires 'libffi >= 3.0.0' but version of libffi is 2.1
      Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycairo
Successfully built opentypespec
Failed to build pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 23.2.1 -> 24.1
[notice] To update, run: pip install --upgrade pip
make: *** [venv-test/touchfile] Error 1

Very strange because when I enter pip --version it spits back:

▶ pip --version
pip 24.1 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)

@simoncozens
Copy link
Contributor

I'm not surprised by the pip thing. The versions of pip when you run it on the command line and the version installed in the venv are different.

Obviously make update-project-template is not giving you the files which have been created since you used the template, which is a pain. Unfortunately I don't know a better way of forcing an update, but I will see if I can find something.

For pycairo to build, looks like you need brew upgrade libffi.

@weiweihuanghuang
Copy link
Author

Can I manually make the update somehow?

@simoncozens
Copy link
Contributor

You don't need to update pip, it should be good enough; you've done the manual update of the template by copying the new files across; you just now need to update libffi.

@weiweihuanghuang
Copy link
Author

weiweihuanghuang commented Jun 28, 2024

Ok I wiped reset my project folder and ran the above steps (including copying requirements.in, requirements-test.in, requirements-test.txt) and get a different error now when I run make update:

touch venv/touchfile
test -d venv-test || python3 -m venv venv-test
. venv-test/bin/activate; pip install -Ur requirements-test.txt
/bin/sh: venv-test/bin/activate: No such file or directory
make: *** [venv-test/touchfile] Error 1

@weiweihuanghuang
Copy link
Author

weiweihuanghuang commented Jun 28, 2024

The only way I could get it to run make update was by cloning the repo fresh and then running make customize then manually copying the venv folder over. Then I get this error:

venv/bin/pip install --upgrade pip-tools
make: venv/bin/pip: No such file or directory
make: *** [update] Error 1

Even though I already have the latest pip:

▶ pip install --upgrade pip
Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (24.1.1)

@weiweihuanghuang
Copy link
Author

weiweihuanghuang commented Jun 28, 2024

Actually I ended up having to copy basically every file and folder (except sources and customised files) over manually from the fresh customized repo. If there's no problem with me manually copying the updates over then can I just push that as my project comit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants