From a310c28a5272bf36d1036a51e7c69741ae9063ca Mon Sep 17 00:00:00 2001 From: Gnarwhal Date: Wed, 31 Jul 2024 20:15:29 +0000 Subject: [PATCH] =?UTF-8?q?Moved=20to=20shiny=20new=20pyproject.toml=20fro?= =?UTF-8?q?m=20gross=20disgusting=20old=20setup.py=20=F0=9F=A4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 30 ++++++++++++++++++++++++++++++ setup.py | 18 ------------------ src/sshare/__main__.py | 3 +++ {sshare => src/sshare}/cli.py | 16 ++++++++++++++-- 4 files changed, 47 insertions(+), 20 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py create mode 100644 src/sshare/__main__.py rename {sshare => src/sshare}/cli.py (67%) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a7af96b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["setuptools", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "sshare" +dynamic = ["version"] +authors = [ + { name = "Gnarwhal", email = "git.aspect893@passmail.net" }, +] +description = "Upload files to a server via ssh" +readme = "README.md" +classifiers = [ + "Intended Audience :: End Users/Desktop", + "Environment :: Console", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", +] +dependencies = [ + "pyclip", +] + +[project.urls] +Homepage = "https://forge.monodon.me/Gnarwhal/sshare" +Documentation= "https://forge.monodon.me/Gnarwhal/sshare/README.md#Usage" +Repository = "https://forge.monodon.me/Gnarwhal/sshare" +Issues = "https://forge.monodon.me/Gnarwhal/sshare/issues" + +[project.scripts] +sshare = "sshare.cli:main" + diff --git a/setup.py b/setup.py deleted file mode 100644 index de7ee60..0000000 --- a/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -from setuptools import setup - -setup( - name='sshare', - version='0.1.0', - license='GPL-3.0-or-later', - url='https://forge.monodon.me/Gnarwhal/sshare', - description=' Convenience script for uploading files to a server via ssh', - author='Gnarwhal', - author_email='git.aspect893@passmail.net', - packages=['sshare'], - install_requires=[ - 'pyclip', - ], - entry_points={ - 'console_scripts': ['sshare = sshare.cli:main'] - } -) diff --git a/src/sshare/__main__.py b/src/sshare/__main__.py new file mode 100644 index 0000000..d92dc90 --- /dev/null +++ b/src/sshare/__main__.py @@ -0,0 +1,3 @@ +from cli import main + +main() diff --git a/sshare/cli.py b/src/sshare/cli.py similarity index 67% rename from sshare/cli.py rename to src/sshare/cli.py index f1b308a..bc2492d 100644 --- a/sshare/cli.py +++ b/src/sshare/cli.py @@ -1,4 +1,16 @@ -#!/usr/bin/env python3 +# This file is part of SSHare. +# +# SSHare is free software: you can redistribute it and/or modify it under the terms of +# the GNU General Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any later version. +# +# SSHare is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# SSHare. If not, see . import getpass import importlib.util @@ -54,4 +66,4 @@ class Config: self.ssh_port = 2222 self.ssh_user = getpass.getuser() self.ssh_target = "monodon.me" - self.ssh_dir = "/srv/sshare" + self.ssh_dir = "/srv/gnarwhal/sshare"