-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
46 lines (42 loc) · 1.38 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/0env python3
# Templated from https://github.com/pybind/python_example
import sys
import os
from glob import glob
from pybind11 import get_cmake_dir
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup, Extension, find_packages
__version__ = "0.1.13"
ext_modules = [
Pybind11Extension("binary2strings",
sorted(glob("src/*.cpp")), # Sort source files for reproducibility
define_macros = [('VERSION_INFO', __version__)],
include_dirs = ["src"],
),
]
# Note to self to build and upload skip existing:
# Delete dist/ and build/
# python setup.py sdist bdist_wheel
# twine upload dist/* --skip-existing
# Get token from https://pypi.org/manage/account/token/
# Use username __token__
# Use password from token
# Delete token after use
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='binary2strings',
version=__version__,
author='Geoff McDonald',
author_email='[email protected]',
url='https://github.com/glmcdona/binary2strings',
license='MIT',
description='Fast string extraction from binary buffers.',
long_description=long_description,
long_description_content_type="text/markdown",
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
test_suite='tests',
zip_safe=False,
python_requires=">=3.7",
)