Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[metadata]
name = bink
version = 0.3.1
author = Rafael Garcia
description = Runtime for Ink, a scripting language for writing interactive narrative
long_description = file: README.rst
license = Apache 2.0
classifiers =
Programming Language :: Python :: 3

[options]
zip_safe = False
packages = find:

[options.packages.find]
exclude =
tests*
dist*
build*
31 changes: 11 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
"""Package definition."""
import setuptools, sys
from setuptools import find_packages, setup


import sys
from setuptools import setup, Distribution
from wheel.bdist_wheel import bdist_wheel
from os import path
from io import open

class BinaryDistribution (setuptools.Distribution):

class BinaryDistribution (Distribution):
def has_ext_modules(self):
return True


class BdistWheel(bdist_wheel):
def get_tag(self):
return ('py3', 'none') + bdist_wheel.get_tag(self)[2:]
return ('py3', 'none') + super().get_tag()[2:]


def get_package_data():
plat_name_idx = None
Expand All @@ -32,35 +35,23 @@ def get_package_data():
lib = 'bink.dll'
else:
raise RuntimeError('Unsupported platform: ' + plat_name)

arch = "x86_64/"
if "arm64" in plat_name or "aarch64" in plat_name:
arch = "arm64/"

lib = arch + lib

return ['native/' + lib]

# if it is not present, return ['native/*']
return ['native/*']

description = open(
path.join(path.abspath(path.dirname(__file__)), 'README.rst'),
encoding='utf-8').read()

setup(
name='bink',
packages=find_packages(exclude=['tests']),
version='0.3.1',
description='Runtime for Ink, a scripting language for writing interactive narrative',
long_description_content_type='text/x-rst',
long_description=description,
author='Rafael Garcia',
license='Apache 2.0',
package_data={'bink': get_package_data()},
distclass = BinaryDistribution,
cmdclass = {
'bdist_wheel': BdistWheel,
},
zip_safe=False # native libraries are included in the package
)