Updated for latest merge

Harvey Tindall 2020-06-16 20:33:48 +01:00
parent 0dfd4ac647
commit 7ad1105baf

@ -20,12 +20,15 @@ hrfee@lab:~/jellyfin-accounts# sudo docker build -t jellyfin-accounts .
**Note**: Sometimes watchdog (used for watching Jellyfin directory) will not work on the directory mounted to `/jf`. This is probably a permissions issue, but a quick (albeit possibly dangerous) fix is to to create the container with `--privileged` as an option. **Note**: Sometimes watchdog (used for watching Jellyfin directory) will not work on the directory mounted to `/jf`. This is probably a permissions issue, but a quick (albeit possibly dangerous) fix is to to create the container with `--privileged` as an option.
**Windows note**: This will not work on Docker for windows, although someone with a similar watchdog related problem said [this](http://blog.subjectify.us/miscellaneous/2017/04/24/docker-for-windows-watch-bindings.html) workaround worked for them. **Windows note**: This will not work on Docker for windows, although someone with a similar watchdog related problem said [this](http://blog.subjectify.us/miscellaneous/2017/04/24/docker-for-windows-watch-bindings.html) workaround worked for them.
## Debian ## Pip
First, ensure all the necessary dependencies are installed. `hrfee@lab:~$ pip install jellyfin-accounts`
`hrfee@lab:~$ sudo apt-get install libsasl2-dev python3-dev python3-pip libldap2-dev libssl-dev` * Note: if you get a dependency error on linux, try installing `libssl-dev` or the equivalent on your system.
Next, acquire the software. ## Manual build/install
First, make sure you have poetry installed. See [here](https://python-poetry.org/docs/) for instructions.
Then clone the repo.
`hrfee@lab:~$ git clone https://github.com/hrfee/jellyfin-accounts.git` `hrfee@lab:~$ git clone https://github.com/hrfee/jellyfin-accounts.git`
@ -33,34 +36,14 @@ Then enter the directory, grab python dependencies and run the install.
``` ```
hrfee@lab:~$ cd jellyfin-accounts hrfee@lab:~$ cd jellyfin-accounts
hrfee@lab:~/jellyfin-accounts# pip3 install -r requirements.txt hrfee@lab:~/jellyfin-accounts# poetry update
hrfee@lab:~$ python3 setup.py install hrfee@lab:~$ poetry install
``` ```
From there, you can run `poetry run jf-accounts` every time, or you can build a package with `poetry build`. The resulting wheel can be found in `dist/`, where you can run `pip install <filename>.whl` to install.
## Windows ## Windows
This can be a pretty cumbersome process, so you might just want to go the WSL route. If not: There used to be an issue with dependencies, but i've since discovered that it was completely unnecessary anyway. Installation should be the same as above through pip.
1. first, ensure pyOpenSSL is installed before the other requirements: `pip3 install pyOpenSSL`.
2. Next, you need to get python-ldap.
* The best route is to get a pre-built binary of python-ldap from [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/).
* Make sure you get the right architecture, and don't get pyLDAP by mistake.
* Download it, open a shell and run `pip3 install <path-to-python-ldap.whl>`.
* The other, even longer route is to build it through `pip3 install python-ldap`, but this requires Visual C++ 14 from Microsoft, which you can find [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
* Run the downloaded program, and select 'C++ Build Tools'. Yeah, it's huge. ![MSVC Picture](https://dump.hrfee.pw/msvc.jpg)
* You may have to scroll down on the right menu and select v140, although i haven't tested this. Install, and hopefully you should be able to then build with `pip3 install python-ldap`.
3. Next, acquire jellyfin-accounts, either by pressing "Download ZIP" and extracting, or cloning through git.
4. Run `pip3 install -r requirements.txt` inside the jellyfin-accounts directory
5. Once you've got your deps installed, run `python3 setup.py install`.
* If that worked, jf-accounts should be in your path already. If not it'll be somewhere like `C:\Users\username\AppData\Local\Programs\Python\Python38-32\Scripts\jf-accounts`.
* The shebang at the top of the executable is for unix-like systems, so just running this at first will ask you what program to open it with. Find your `python.exe`and set that as default. If not, just run it with `python3 <path to jf-accounts>`.
## Other OSes
It should be as simple as `python3 setup.py install`. If not, submit an issue.
## What next? ## What next?
See [setup](https://github.com/hrfee/jellyfin-accounts/wiki/Setup). See [setup](https://github.com/hrfee/jellyfin-accounts/wiki/Setup).