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

Don't require sudo for install #115

Open
bmschmidt opened this issue Aug 23, 2016 · 1 comment
Open

Don't require sudo for install #115

bmschmidt opened this issue Aug 23, 2016 · 1 comment
Assignees

Comments

@bmschmidt
Copy link
Member

pip install . now works, which suggests we can publish to pypi soon.

But currently a successful pip install requires sudo. This is bad for all sorts of reasons.

The only big obstacles I know off the top of my head is:

  1. the dbbindings.py script needs to be place in /usr/lib/cgi-bin. This is only necessary for a subset of bookworms, anyway: some people will use a flask server, or the bookworm serve method, and so don't need to hit their system files at all. Rather than happening in the core install, there should be a new command called bookworm config apache2 that parcels out that script for those who want apache to handle their API calls over port 80.
  2. There are various other situations in which an interactive or non-interactive script will ask for root access. (For example, to modify the file at /etc/mysql/my.cnf; or for that new apache2 call.) Typically this happens through bookworm invoking itself on the command line through a subprocess. If bookworm isn't installed in the root user's path, these might fail. This is a particular pain when things happen like a virtualenv handling python installation.
  3. Similarly to 2: when running the API through Apache, typically the user invoking python is not the user who installed bookworm. (It's www-data or httpd or something like that). So that user also needs bookworm in their pythonpath.

The solution to 1 is easy. For 2 and 3, it is necessary to install bookworm separately for root and for the username, or to perform some gymnastics on various PYTHONPATH variables.

@bmschmidt bmschmidt self-assigned this Aug 23, 2016
@bmschmidt
Copy link
Member Author

On a slightly murkied Ubuntu VM install, I need sudo to install the required dependency regex. So maybe this is a fool's errand.

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

1 participant