Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make an actual package with pyproject.toml #2036

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ LABEL org.label-schema.vcs-ref=$VCS_REF \
COPY --from=build /wheels /wheels
COPY . /opt/sherlock/

RUN pip3 install --no-cache-dir -r requirements.txt -f /wheels \
RUN pip3 install --no-cache-dir . -f /wheels \
&& rm -rf /wheels

WORKDIR /opt/sherlock/sherlock

ENTRYPOINT ["python", "sherlock.py"]
ENTRYPOINT ["sherlock"]
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,13 @@
## Installation

```console
# clone the repo
$ git clone https://github.com/sherlock-project/sherlock.git

# change the working directory to sherlock
$ cd sherlock

# install the requirements
$ python3 -m pip install -r requirements.txt
pip install git+https://github.com/sherlock-project/sherlock.git
```

## Usage

```console
$ python3 sherlock --help
$ sherlock --help
usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT]
[--output OUTPUT] [--tor] [--unique-tor] [--csv]
[--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE]
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project.scripts]
sherlock = "sherlock:main"

[project.urls]
Homepage = "http://sherlock-project.github.io/"
Repository = "https://github.com/sherlock-project/sherlock.git"
Issues = "https://github.com/sherlock-project/sherlock/issues"

[project]
name = "sherlock"
readme = "README.md"
license = {file = "LICENSE"}
dynamic = ["dependencies", "version"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version doesnt seem to be found. Would it be better to hard code it using version = 0.14.3

$ pipx install .         
  installed package sherlock 0.0.0, installed using Python 3.11.6
  These apps are now globally available
    - sherlock
done! ✨ 🌟 ✨


[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools]
package-dir = {"" = "sherlock"}