Skip to content

Commit

Permalink
Remove MANIFEST.in and include_package_data, specify package_data man…
Browse files Browse the repository at this point in the history
…ually

This allows finer control over what gets packaged, and fixes a
deprecation warning in recent setuptools versions (see
pypa/setuptools#3308 for detais).
It also prevents Cython-transpiled C source files being included in
the wheel distribution, which roughly halves the size of the installed
distribution.
  • Loading branch information
jacklovell committed Feb 24, 2023
1 parent a029b09 commit 3007d55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.28", "raysect==0.8.1"]
requires = ["setuptools>=62.3", "oldest-supported-numpy", "cython>=0.28", "raysect==0.8.1"]
build-backend="setuptools.build_meta"
12 changes: 8 additions & 4 deletions setup.py
@@ -1,11 +1,11 @@
from setuptools import setup, find_packages, Extension
from collections import defaultdict
import sys
import numpy
import os
import os.path as path
from pathlib import Path
import multiprocessing
import numpy
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize

multiprocessing.set_start_method('fork')
Expand Down Expand Up @@ -117,8 +117,12 @@
"matplotlib",
"raysect==0.8.1",
],
packages=find_packages(include=["cherab*"]),
include_package_data=True,
packages=find_packages(include=["cherab"]),
package_data={"": [
"**/*.pyx", "**/*.pxd", # Needed to build Cython extensions.
"**/*.json", "**/*.cl", "**/*.npy", "**/*.obj", # Supplementary data
"cherab/core/VERSION", # Used by cherab.core to determine version at run time
]},
data_files=data_files,
zip_safe=False,
ext_modules=extensions,
Expand Down

0 comments on commit 3007d55

Please sign in to comment.