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 it possible to install critic on Mac #78

Open
rchl opened this issue Oct 5, 2014 · 3 comments
Open

Make it possible to install critic on Mac #78

rchl opened this issue Oct 5, 2014 · 3 comments

Comments

@rchl
Copy link
Collaborator

rchl commented Oct 5, 2014

I don't have much experience with critic installation process (only tried it on Linux) and not that much in Mac itself, but I'd really like to be able to install it there.

I have a Mac so I can contribute or maybe even do it myself, but having someone willing to help would be nice too.

@rchl
Copy link
Collaborator Author

rchl commented Oct 5, 2014

os.getresuid() is not available on Mac.

Traceback (most recent call last):
  File "install.py", line 113, in <module>
    cwd=installation.root_dir).strip():
  File "/Users/rchlodnicki/workspace/critic/installation/utils.py", line 116, in run_git
    return subprocess.check_output(args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/Users/rchlodnicki/workspace/critic/installation/utils.py", line 280, in as_effective_user_from_path
    os.seteuid(os.getresuid()[0])
AttributeError: 'module' object has no attribute 'getresuid'

@jacobrask
Copy link
Collaborator

While not exactly the same thing, I got Critic running in Docker on my Mac. Docker is a light weight Linux runtime, and on Mac also includes a VM with very little overhead.

I manage it through a little shell script that will install, start and update/upgrade Critic. This script should work just the same on Linux, but I haven't tried it there.

On Mac, install Docker + Boot2Docker. They are available as homebrew recipes:

brew install docker
brew install boot2docker

boot2docker init
boot2docker up
boot2docker shellinit

Then use critic-docker:

cd critic
critic-docker install
critic-docker run

hack, commit

critic-docker update

One caveat is that you currently can't specify a custom postgres host/port as an installation parameter, and I didn't bother to fix that, so you need to add "host": "postgres" to data["installation.database.parameters"] in installation/database.py. (In the critic-docker setup, postgres is run in a separate Docker container exposed with the hostname postgres to the main Critic container.)

@jjgod
Copy link

jjgod commented May 2, 2015

See isislovecruft/python-gnupg#28

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

No branches or pull requests

3 participants