Skip to content

Commit

Permalink
packages/open-browser: use pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Oct 16, 2023
1 parent 7dd2065 commit ead1bea
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions packages/open-browser/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
python3.pkgs.buildPythonApplication rec {
pname = "open-browser";
version = "0.1";
format = "pyproject";

src = ./.;

propagatedBuildInputs = with python3.pkgs; [ setuptools ];

desktopItem = makeDesktopItem {
categories = [
"Application"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_url_map(config_path):
return {}


def main(argv):
def main(argv = sys.argv):
url = argv[-1]
url_map = get_url_map(CONFIG_PATH)
browser = get_browser_for_url(url, url_map)
Expand Down
12 changes: 12 additions & 0 deletions packages/open-browser/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build-system]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "open-browser"
version = "0.1"
description = "Open browser according to user preference"
requires-python = ">=3.9"

[project.scripts]
open-browser = "open_browser:main"
8 changes: 0 additions & 8 deletions packages/open-browser/setup.py

This file was deleted.

0 comments on commit ead1bea

Please sign in to comment.