5
5
6
6
from setuptools .command .build_ext import build_ext
7
7
from setuptools .command .install import install
8
- from distutils .command .sdist import sdist
8
+ from setuptools .command .sdist import sdist
9
9
import sys
10
10
import subprocess
11
11
@@ -39,8 +39,7 @@ def initialize_options(self):
39
39
super ().initialize_options ()
40
40
self .vendor_crates = 0
41
41
42
- def get_file_list (self ):
43
- super ().get_file_list ()
42
+ def make_distribution (self ):
44
43
if self .vendor_crates :
45
44
manifest_paths = []
46
45
for ext in self .distribution .rust_extensions :
@@ -76,7 +75,7 @@ def get_file_list(self):
76
75
# Check whether `.cargo/config`/`.cargo/config.toml` already exists
77
76
existing_cargo_config = None
78
77
for filename in (f".cargo{ os .sep } config" , f".cargo{ os .sep } config.toml" ):
79
- if filename in self .filelist .allfiles :
78
+ if filename in self .filelist .files :
80
79
existing_cargo_config = filename
81
80
break
82
81
if existing_cargo_config :
@@ -89,6 +88,7 @@ def get_file_list(self):
89
88
f .write (cargo_config )
90
89
self .filelist .append (vendor_path )
91
90
self .filelist .append (cargo_config_path )
91
+ super ().make_distribution ()
92
92
dist .cmdclass ["sdist" ] = sdist_rust_extension
93
93
94
94
build_ext_base_class = dist .cmdclass .get ('build_ext' , build_ext )
0 commit comments