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

bash sourcemod/tools/checkout-deps.sh fails to run #1324

Closed
3 of 6 tasks
enderandrew opened this issue Jul 27, 2020 · 10 comments · Fixed by #1328
Closed
3 of 6 tasks

bash sourcemod/tools/checkout-deps.sh fails to run #1324

enderandrew opened this issue Jul 27, 2020 · 10 comments · Fixed by #1328

Comments

@enderandrew
Copy link

Help us help you

  • I have checked that my issue doesn't exist yet.
  • I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
  • I can always reproduce the issue with the provided description below.

Environment

  • Operating System version: Debian 10
  • Game/AppID (with version if applicable): TF2
  • Current SourceMod version:
  • Current SourceMod snapshot:
  • Current Metamod: Source snapshot:

Description

Trying to download a build environment, checkout-deps.sh throws an error on ambuild2

Traceback (most recent call last):
File "", line 1, in
ImportError: No module named ambuild2
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'ambuild2'
Cloning into 'ambuild'...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 2647 (delta 35), reused 46 (delta 34), pack-reused 2584
Receiving objects: 100% (2647/2647), 1.53 MiB | 8.77 MiB/s, done.
Resolving deltas: 100% (1820/1820), done.
Traceback (most recent call last):
File "setup.py", line 4, in
from setuptools import setup, find_packages
ImportError: No module named setuptools
Installing AMBuild at the user level. Location can be: ~/.local/bin
Traceback (most recent call last):
File "setup.py", line 4, in
from setuptools import setup, find_packages
ImportError: No module named setuptools

Problematic Code (or Steps to Reproduce)

// TODO(you): code here to reproduce the problem

Logs

  • Please attach in separate files: game output, library logs, kernel logs, and any other supporting information.
  • In case of a crash, please attach minidump or dump analyze output.
@Headline
Copy link
Member

Install the python3-setuptools package

sudo apt-get install python3-setuptools

@WildCard65
Copy link
Contributor

Here's a reference on why setuptools is now required:
alliedmodders/ambuild#68

Should @Headline suggestion not work for you, you can manually resolve this by installing 'pip' as it depends on setuptools.

@dvander
Copy link
Member

dvander commented Jul 27, 2020

We should add this to checkout-deps.sh, since it is a new dependency.

@enderandrew
Copy link
Author

Even after installing python3-setuptools and pip, I'm still getting the error. Is this maybe an issue where the script is designed for python 2 instead of python 3?

From https://github.com/alliedmodders/ambuild
 * branch            master     -> FETCH_HEAD
Already up to date.
Traceback (most recent call last):
  File "setup.py", line 4, in
    from setuptools import setup, find_packages
ImportError: No module named setuptools
Installing AMBuild at the user level. Location can be: ~/.local/bin
Traceback (most recent call last):
  File "setup.py", line 4, in
    from setuptools import setup, find_packages
ImportError: No module named setuptools

@dvander
Copy link
Member

dvander commented Jul 27, 2020

Yes, the script does assume Python 2.

@enderandrew
Copy link
Author

After installing python-setuptools (as opposed to python3-setuptools) this script runs successfully.

@KyleSanderson
Copy link
Member

Yeah that's a gap @enderandrew , thanks for raising this.

@WildCard65 do you think you can help out here with a PR to add this dependency to checkout-deps?

@WildCard65
Copy link
Contributor

WildCard65 commented Jul 28, 2020 via email

@WildCard65
Copy link
Contributor

@dvander @KyleSanderson Some unfortunate news though, it seems both Debian and Ubuntu are planning on removing Python2 from newer versions, this could potentially introduce issues with checkout-deps if 'python' command is no longer available.

@dvander
Copy link
Member

dvander commented Jul 28, 2020

python blah || true

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