st4lk / django-rest-social-auth

OAuth signin with django rest framework
MIT License
521 stars 122 forks source link

rest-social-auth is missing in requirements files #120

Open ovidiuc opened 4 years ago

ovidiuc commented 4 years ago

It's required to run the example project and it's not getting added when installing the requirements (tried them all).

st4lk commented 4 years ago

Hi @ovidiuc Can you say, how do you run the example project? I recommend to use make command - this is a single command that should start the example project, check readme.

For the example project, the idea is that rest_social_auth dependency will be taken from your cloned repository, not from pypi.

ovidiuc commented 4 years ago

Ah, I see.

I couldn't use make in my convoluted setup anyway, as it would require to run it on Windows. There are options I see, but overkill for me wanting to just check out the example project.

I have a Debian virtual machine for development, but requires to be NAT for the rest of my setup so the IP used in the browser wouldn't be 127.0.0.1, as I see is required, but my VMs IP.

So I've just git cloned the project, made a virtualenv for it, installed all the requirements from the requirements files and tried to migrate. Got the error of missing package and installed it manually.

Apologies for not fully reading the instructions, if it works with make/docker, than this is only an issue for those that can't use it.

st4lk commented 4 years ago

If you want to run the example project in native environment (not in Docker) and you have make util, just run this:

make native-run-example

If you don't have the make util, use this command (copy-pasting it from Makefile):

PYTHONPATH='.' python example_project/manage.py runsslserver 0.0.0.0:8000

Probably I better add instructions above ^ to the README

ovidiuc commented 4 years ago

Yes, that wasn't a problem for me, since I'm using runsslserver in my own project, so I know the command. Just the missing package was the issue. I ran the example project fine for myself after installing it manually, I've just opened the issue in case others have the same problem.

Out of curiosity, I've tried running the make file with Docker, as per README, on a Debian Buster machine and got the following error at the end of the process:

Docker version 19.03.6 GNU Make 4.2.1

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '//django_rest_social_auth/venv/lib/python3.7/site-packages/pytz-2019.3.dist-info'
Consider using the '--user' option or check the permissions.

WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
make: *** [Makefile:45: .install] Error 1
make[1]: *** [Makefile:22: run] Error 2

I've added locally --user option to the pip install commands in Makefile and now it dies with this error:

PYTHONPATH='.' python example_project/manage.py migrate
Traceback (most recent call last):
  File "example_project/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
make: *** [Makefile:61: native-migrate] Error 1
make[1]: *** [Makefile:22: run] Error 2

Since I already got it working in my own environment, this is not an issue for me, but might be for others trying to use the Docker image. But it seems to be a problem other than the one in the title.