Skip to content

Commit

Permalink
feat: Move scrapyd script to __main__.py https://docs.python.org/3/li…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 16, 2024
1 parent 84a5101 commit 1362df7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Changed

- Add a confirmation dialog to the Cancel button.
- Add "Last modified" column to the directory listings of log files and item feeds.
- The Scrapyd CLI runs from the ``scrapyd.__main__`` module instead of from the ``scrapyd.scripts.scrapyd_run`` module.
- Drop support for end-of-life Python version 3.7.

Fixed
Expand Down
2 changes: 0 additions & 2 deletions scrapyd/scripts/scrapyd_run.py → scrapyd/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

import pkgutil
import sys
from os.path import dirname, join
Expand Down
2 changes: 1 addition & 1 deletion scrapyd/tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from scrapyd.scripts.scrapyd_run import main
from scrapyd.__main__ import main

__version__ = pkgutil.get_data(__package__, '../VERSION').decode('ascii').strip()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
],
entry_points={
'console_scripts': [
'scrapyd = scrapyd.scripts.scrapyd_run:main'
'scrapyd = scrapyd.__main__:main'
]
}
)

0 comments on commit 1362df7

Please sign in to comment.