Skip to content

Commit

Permalink
Update setup.py to allow install (#94)
Browse files Browse the repository at this point in the history
I am no python packaging expert so this may be entirely wrong. However,
currently:

```
$docker run --rm -v $PWD:$PWD -w $PWD -it --entrypoint bash python -c 'pip install . -r requirements.txt; i3-agenda'
ModuleNotFoundError: No module named 'i3_agenda.i3_agenda'; 'i3_agenda' is not a package
```

This PR fixes this and allows installing
  • Loading branch information
howardjohn committed Jun 5, 2023
1 parent 2f4e027 commit d83a46f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Make sure python3 is your default python.\
Run `sudo pip3 install python-bidi google-api-python-client google-auth-httplib2 google-auth-oauthlib`

1. Clone the repo to a local directory `cd ~/ && git clone https://github.com/rosenpin/i3-agenda && cd i3-agenda`
3. Run the script `python3 i3_agenda/__init__.py -c $CREDENTIALS_FILE_PATH` with "$CREDENTIALS_FILE_PATH" replaced with the path to the credentials.json file you downloaded in the previous step. If configured correctly, it will prompt you to log in in your browser, accept everything. It should print your next event.
3. Run the script `python3 i3_agenda/i3_agenda.py -c $CREDENTIALS_FILE_PATH` with "$CREDENTIALS_FILE_PATH" replaced with the path to the credentials.json file you downloaded in the previous step. If configured correctly, it will prompt you to log in in your browser, accept everything. It should print your next event.
4. Optional: you can run `sudo python setup.py install` to add the script to your path so you can run `i3-agenda` anywhere.
5. Add configuration to your bar (examples in the Examples section below).

Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@
"aiohttp",
],
scripts=[
"i3_agenda/config.py",
"i3_agenda/event.py",
"i3_agenda/API.py",
"i3_agenda/cache_utils.py",
"i3_agenda/config.py",
"i3_agenda/const.py",
"i3_agenda/event.py",
"i3_agenda/helpers.py",
"i3_agenda/i3_agenda.py",
],
entry_points={
"console_scripts": [
"i3-agenda = i3_agenda.i3_agenda:main",
"i3-agenda = i3_agenda:main",
],
},
python_requires=">=3.3",
Expand Down

0 comments on commit d83a46f

Please sign in to comment.