Skip to content

Commit

Permalink
Modernize packaging (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
twizmwazin authored Nov 19, 2023
1 parent 7b6bc18 commit b2ff6e0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "dailalib"
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
]
license = {text = "BSD 2 Clause"}
description = "Decompiler Artificial Intelligence Language Assistant"
urls = {Homepage = "https://github.com/mahaloz/DAILA"}
requires-python = ">= 3.5"
dependencies = [
"openai>=0.27.4",
"binsync",
"PySide6-Essentials",
"tiktoken",
]
dynamic = ["version"]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.scripts]
daila = "dailalib.__main__:main"

[tool.setuptools]
include-package-data = true
license-files = ["LICENSE"]

[tool.setuptools.packages]
find = {namespaces = false}

[tool.setuptools.package-data]
daila = ["plugins/*.py"]

[tool.setuptools.dynamic]
version = {attr = "dailalib.__version__"}
12 changes: 0 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# pylint: disable=missing-class-docstring
import os
import platform
import shutil
from pathlib import Path
import sys
from distutils.util import get_platform
from distutils.command.build import build as st_build

from setuptools import setup
Expand Down Expand Up @@ -52,13 +49,4 @@ def run(self, *args):
"develop": develop,
}

if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
sys.argv.append('--plat-name')
name = get_platform()
if 'linux' in name:
sys.argv.append('manylinux2014_' + platform.machine())
else:
# https://www.python.org/dev/peps/pep-0425/
sys.argv.append(name.replace('.', '_').replace('-', '_'))

setup(cmdclass=cmdclass)

0 comments on commit b2ff6e0

Please sign in to comment.