Skip to content

Don't require sudo for install #115

@bmschmidt

Description

@bmschmidt

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions