Skip to content

Commit

Permalink
Update requirements (pymedusa#6628)
Browse files Browse the repository at this point in the history
* Update dependency lists:

  - Remove `oauth2` from `requirements.txt`
  - Fix `adba` commit
  - Fix `cfscrape` package name
  - Fix `subliminal` commit
  - Fix `deluge-client` module
  - Add markers for some dependencies

* Update `_check_python_version` to disallow `< 3.5`

* Better requirement URLs for github deps

Use `tar.gz` archives from `codeload.github.com` instead of git.
Should be faster and lighter.

* Reorder columns (remove `Status`)

* Sort lists by package name

* Move all packages for Python < 3.5 into `ext2`:

  - Move `singledispatch` to `ext2`
    Anything for Python versions below 3.4 is Python 2.7 in our case
  - Move `backports_abc` to `ext2`
    Anything for Python versions below 3.5 is Python 2.7 in our case

* Remove markers from list

Use `folder` to apply markers when generating `requirements.txt`

* Update `requirements.txt` based off of list

To only contain:
  - Packages directly imported/used by `medusa`
  - Git dependencies

* Remove unreachable code

See `medusa/init/__init__.py`:
`_check_python_version` executes first

* Fix `validators` version
  • Loading branch information
sharkykh authored and medariox committed May 5, 2019
1 parent 98e6907 commit c24e989
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 114 deletions.
5 changes: 0 additions & 5 deletions SickBeard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"""Script for backwards compatibility."""
from __future__ import unicode_literals

import sys

from medusa.__main__ import main

if __name__ == '__main__':
if sys.version_info.major == 3 and sys.version_info.minor < 5:
print('Medusa supports Python 2 from version 2.7.10 and Python 3 from version 3.5.0, exiting!')
raise Exception('Incorrect Python version. Shutting down!')
main()
142 changes: 71 additions & 71 deletions ext/readme.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 16 additions & 16 deletions lib/readme.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
## lib
Status | Package | Version / Commit | Usage | Folder | Notes
:------: | :-------: | :----------------: | :---- | :--: | :----
:: | `certgen.py` | [d52975c](https://github.com/pyca/pyopenssl/blob/d52975cef3a36e18552aeb23de7c06aa73d76454/examples/certgen.py) | **`medusa`** | lib | **Not a package**
:: | `native` | - | `pymediainfo` | lib | **Not a package**
:: | `pkg_resources` | ????? | `babelfish`, `enzyme`, `guessit`, `stevedore`, `pint`, ... | lib | **Not a package**<br>Part of `setuptools`
:: | `pymediainfo` | [2.2.1](https://pypi.org/project/pymediainfo/2.2.1/) | `knowit` | lib | **Modified**: Version number fixed
:: | `pytimeparse` | [1.1.5](https://pypi.org/project/pytimeparse/1.1.5/) | **`medusa`** | lib | **Modified**: [#1792](https://github.com/pymedusa/Medusa/pull/1792)
:: | `pytvmaze` | [2.0.7](https://pypi.org/project/pytvmaze/2.0.7/) | **`medusa`** | lib | **Modified**: [#1706](https://github.com/pymedusa/Medusa/pull/1706)
:: | `rtorrent-python` | [0.2.9](https://pypi.org/project/rtorrent-python/0.2.9/) | **`medusa`** | lib | Module: `rtorrent`<br>**Modified**: [commit log](https://github.com/pymedusa/Medusa/commits/master/lib/rtorrent)
:: | `send2trash` | [1.5.0](https://pypi.org/project/Send2Trash/1.5.0/) | **`medusa`** | lib | **Modified**: Applied [hsoft/send2trash#33](https://github.com/hsoft/send2trash/pull/33)
:: | `shutil_custom` | - | **`medusa`** | lib | **Custom**
:: | `simpleanidb` | pymedusa/[5d26c8c](https://github.com/pymedusa/simpleanidb/tree/5d26c8c146891225c05651821ef34ced0c118221) | **`medusa`** | lib | -
:: | `tmdbsimple` | [2.2.0](https://pypi.org/project/tmdbsimple/2.2.0/) | **`medusa`** | lib | **Modified**: [#4026](https://github.com/pymedusa/Medusa/pull/4026) -- [Upstream PR](https://github.com/celiao/tmdbsimple/pull/52)
:: | `traktor` | - | **`medusa`** | lib | **Custom**
:: | `tvdbapiv2` | pymedusa/[3a51858](https://github.com/pymedusa/tvdbv2/tree/3a51858640cfcb960be635e91394cbce1d73e036) | **`medusa`** | lib | **Modified**: [Upstream PR](https://github.com/pymedusa/tvdbv2/pull/2)
:: | `pyUnRAR2` | [commit](https://github.com/kyegupov/py-unrar2/tree/186a4c1feb9ef3d96a2331f8fb3ebf88036e15e5) | **`medusa`** | lib | Module: `unrar2`<br>**Modified**: [#5096](https://github.com/pymedusa/Medusa/pull/5096)<br>`test.rar` is not part of the package<br>The `UnRARDLL` folder isn't installed through `pip`
Folder | Package | Version / Commit | Usage | Notes
:------: | :-------: | :----------------: | :---- | :----
lib | `certgen.py` | [d52975c](https://github.com/pyca/pyopenssl/blob/d52975cef3a36e18552aeb23de7c06aa73d76454/examples/certgen.py) | **`medusa`** | **Not a package**
lib | `native` | - | `pymediainfo` | **Not a package**
lib | `pkg_resources` | ????? | `babelfish`, `enzyme`, `guessit`, `stevedore`, `pint`, ... | **Not a package**<br>Part of `setuptools`
lib | `pymediainfo` | [2.2.1](https://pypi.org/project/pymediainfo/2.2.1/) | `knowit` | **Modified**: Version number fixed
lib | `pytimeparse` | [1.1.5](https://pypi.org/project/pytimeparse/1.1.5/) | **`medusa`** | **Modified**: [#1792](https://github.com/pymedusa/Medusa/pull/1792)
lib | `pytvmaze` | [2.0.7](https://pypi.org/project/pytvmaze/2.0.7/) | **`medusa`** | **Modified**: [#1706](https://github.com/pymedusa/Medusa/pull/1706)
lib | `pyUnRAR2` | [commit](https://github.com/kyegupov/py-unrar2/tree/186a4c1feb9ef3d96a2331f8fb3ebf88036e15e5) | **`medusa`** | Module: `unrar2`<br>**Modified**: [#5096](https://github.com/pymedusa/Medusa/pull/5096)<br>`test.rar` is not part of the package<br>The `UnRARDLL` folder isn't installed through `pip`
lib | `rtorrent-python` | [0.2.9](https://pypi.org/project/rtorrent-python/0.2.9/) | **`medusa`** | Module: `rtorrent`<br>**Modified**: [commit log](https://github.com/pymedusa/Medusa/commits/master/lib/rtorrent)
lib | `send2trash` | [1.5.0](https://pypi.org/project/Send2Trash/1.5.0/) | **`medusa`** | **Modified**: Applied [hsoft/send2trash#33](https://github.com/hsoft/send2trash/pull/33)
lib | `shutil_custom` | - | **`medusa`** | **Custom**
lib | `simpleanidb` | pymedusa/[5d26c8c](https://github.com/pymedusa/simpleanidb/tree/5d26c8c146891225c05651821ef34ced0c118221) | **`medusa`** | -
lib | `tmdbsimple` | [2.2.0](https://pypi.org/project/tmdbsimple/2.2.0/) | **`medusa`** | **Modified**: [#4026](https://github.com/pymedusa/Medusa/pull/4026) -- [Upstream PR](https://github.com/celiao/tmdbsimple/pull/52)
lib | `traktor` | - | **`medusa`** | **Custom**
lib | `tvdbapiv2` | pymedusa/[3a51858](https://github.com/pymedusa/tvdbv2/tree/3a51858640cfcb960be635e91394cbce1d73e036) | **`medusa`** | **Modified**: [Upstream PR](https://github.com/pymedusa/tvdbv2/pull/2)

Notes:
- `lib` compatible with python2 and python3
Expand Down
4 changes: 2 additions & 2 deletions medusa/init/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def initialize():


def _check_python_version():
if sys.version_info < (2, 7):
print('Sorry, requires Python 2.7.x')
if sys.version_info < (2, 7) or (3,) < sys.version_info < (3, 5):
print('Sorry, requires Python 2.7.x or Python 3.5 and above')
sys.exit(1)


Expand Down
26 changes: 11 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
# No setup.py, unable to install using pip
# git+https://github.com/pymedusa/adba.git@6502307ae34286e44b28234cfbacee6df1eadf07#egg=adba
git+https://github.com/Diaoul/babelfish.git@f403000dd63092cfaaae80be9f309fd85c7f20c9#egg=babelfish
https://codeload.github.com/pymedusa/adba/tar.gz/4d7388c815ee7f54c5479028bd1435083403a18c#egg=adba
https://codeload.github.com/Diaoul/babelfish/tar.gz/f403000dd63092cfaaae80be9f309fd85c7f20c9#egg=babelfish
beautifulsoup4==4.7.1
bencode.py==2.0.0
CacheControl==0.12.5
certifi==2019.3.9
https://codeload.github.com/pymedusa/cloudflare-scrape/tar.gz/1354751d5efd9353ad837d83941ed6b3f4488c77#egg=cfscrape
chardet==3.0.4
git+https://github.com/pymedusa/cloudflare-scrape.git@1354751d5efd9353ad837d83941ed6b3f4488c77#egg=cfscrape
configobj==5.0.6
configparser==3.7.4
contextlib2==0.5.5 ; python_version < '3.5'
contextlib2==0.5.5
deluge-client==1.7.1
dirtyjson==1.0.7
dogpile.cache==0.7.1
git+https://github.com/pymedusa/enzyme.git@665cf6948aab1c249dcc99bd9624a81d17b3302a#egg=enzyme
git+https://github.com/kurtmckee/feedparser.git@2b11c8028321ed43cbaf313f83b0c94820143d66#egg=feedparser
future==0.17.1
futures==3.2.0 ; python_version >= '2.6' and python_version < '3'
enum34==1.1.6 ; python_version == '2.*'
https://codeload.github.com/pymedusa/enzyme/tar.gz/665cf6948aab1c249dcc99bd9624a81d17b3302a#egg=enzyme
https://codeload.github.com/kurtmckee/feedparser/tar.gz/2b11c8028321ed43cbaf313f83b0c94820143d66#egg=feedparser
future==0.17.1 ; python_version == '2.*'
futures==3.2.0 ; python_version == '2.*'
gntp==1.0.3
git+https://github.com/guessit-io/guessit.git@74dbb0c7420cee18969926aba9cc06b8959daa0e#egg=guessit
https://codeload.github.com/guessit-io/guessit/tar.gz/74dbb0c7420cee18969926aba9cc06b8959daa0e#egg=guessit
html5lib==1.0.1
imdbpie==5.6.3
jsonrpclib-pelix==0.4.0
knowit==0.2.4
lockfile==0.12.2
Mako==1.0.9
markdown2==2.3.7
git+https://github.com/joestump/python-oauth2.git@6689960ca23f79eccf9a25a39e93f6540f44ca23#egg=oauth2
profilehooks==1.11.0
PyGithub==1.43.7
PyJWT==1.7.1
Expand All @@ -37,8 +34,7 @@ rebulk==1.0.0
requests==2.21.0
requests-oauthlib==1.2.0
six==1.12.0
stevedore==1.30.1
git+https://github.com/Diaoul/subliminal.git@6ac2fa23ee5baa7d8452552edaa7c4a8a00d237a#egg=subliminal
https://codeload.github.com/Diaoul/subliminal/tar.gz/6ac2fa23ee5baa7d8452552edaa7c4a8a00d237a#egg=subliminal
tornado==5.1.1
tornroutes==0.5.1
validators==0.12.5
5 changes: 0 additions & 5 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"""Startup script."""
from __future__ import unicode_literals

import sys

from medusa.__main__ import main

if __name__ == '__main__':
if sys.version_info.major == 3 and sys.version_info.minor < 5:
print('Medusa supports Python 2 from version 2.7.10 and Python 3 from version 3.5.0, exiting!')
raise Exception('Incorrect Python version. Shutting down!')
main()

0 comments on commit c24e989

Please sign in to comment.