Moved to shiny new pyproject.toml from gross disgusting old setup.py 🤢

This commit is contained in:
Gnarwhal 2024-07-31 20:15:29 +00:00
parent 3641174c18
commit a310c28a52
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
4 changed files with 47 additions and 20 deletions

30
pyproject.toml Normal file
View file

@ -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"

View file

@ -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']
}
)

3
src/sshare/__main__.py Normal file
View file

@ -0,0 +1,3 @@
from cli import main
main()

View file

@ -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 <https://www.gnu.org/licenses/>.
import getpass import getpass
import importlib.util import importlib.util
@ -54,4 +66,4 @@ class Config:
self.ssh_port = 2222 self.ssh_port = 2222
self.ssh_user = getpass.getuser() self.ssh_user = getpass.getuser()
self.ssh_target = "monodon.me" self.ssh_target = "monodon.me"
self.ssh_dir = "/srv/sshare" self.ssh_dir = "/srv/gnarwhal/sshare"