Make pyproject.toml PEP 621 compliant

- converted tool.poetry to PEP 621 (default behavior for poetry)
- converted setup.py to PEP 621 (recommended by setuptools)
- use pyproject.toml instead of version.txt
- use importlib instead of version.txt
- use PEP 621 dependency format in flatpak build scripts
- added tomli as a dev dependency (used in build scripts)
- removed version.txt (no longer used)
- cleaned up dependencies

- version is still in desktop/setup.py (unclear on how snapcraft uses it)
- poetry lockfiles need to be rebuilt
This commit is contained in:
Timothy Cyrus 2025-03-13 18:38:11 -04:00
parent 2cee0508d1
commit 5e89cdcbc4
12 changed files with 197 additions and 175 deletions

View file

@ -18,55 +18,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import setuptools
from setuptools import setup
with open(os.path.join("onionshare_cli", "resources", "version.txt")) as f:
version = f.read().strip()
setuptools.setup(
name="onionshare-cli",
version=version,
long_description=(
"OnionShare lets you securely and anonymously send and receive files. It works by starting a web server, "
"making it accessible as a Tor onion service, and generating an unguessable web address so others can "
"download files from you, or upload files to you. It does _not_ require setting up a separate server or "
"using a third party file-sharing service."
),
author="Micah Lee",
author_email="micah@micahflee.com",
maintainer="Micah Lee",
maintainer_email="micah@micahflee.com",
url="https://onionshare.org",
license="GPLv3",
keywords="onion, share, onionshare, tor, anonymous, web server",
classifiers=[
"Programming Language :: Python :: 3",
"Framework :: Flask",
"Topic :: Communications :: File Sharing",
"Topic :: Security :: Cryptography",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Intended Audience :: End Users/Desktop",
"Operating System :: OS Independent",
"Environment :: Web Environment",
],
packages=[
"onionshare_cli",
"onionshare_cli.web",
],
package_data={
"onionshare_cli": [
"resources/*",
"resources/static/*",
"resources/static/css/*",
"resources/static/img/*",
"resources/static/js/*",
"resources/templates/*",
]
},
entry_points={
"console_scripts": [
"onionshare-cli = onionshare_cli:main",
],
},
)
setup()