File: setup.py

package info (click to toggle)
python-auditwheel 6.6.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: python: 6,165; ansic: 304; cpp: 66; sh: 28; makefile: 25; f90: 12
file content (35 lines) | stat: -rw-r--r-- 983 bytes parent folder | download
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
from __future__ import annotations

import subprocess

from setuptools import setup

subprocess.check_call(
    (
        "gcc",
        "testpackage/testprogram.c",
        "-lgsl",
        "-lgslcblas",
        "-o",
        "testpackage/testprogram",
    ),
)
subprocess.check_call(
    ("gcc", "testpackage/testprogram_nodeps.c", "-o", "testpackage/testprogram_nodeps"),
)

setup(
    name="testpackage",
    version="0.0.1",
    packages=["testpackage"],
    package_data={"testpackage": ["testprogram", "testprogram_nodeps"]},
    # This places these files at a path like
    # "testpackage-0.0.1.data/scripts/testprogram", which is needed to test
    # rewriting ELF binaries installed into the scripts directory.
    #
    # Note that using scripts=[] doesn't work here since setuptools expects the
    # scripts to be text and tries to decode them using UTF-8.
    data_files=[
        ("../scripts", ["testpackage/testprogram", "testpackage/testprogram_nodeps"]),
    ],
)