tools/release_packages: Stop generating sdists.
Now that we do not use MANIFEST.in for zulip_bots, it doesn't make sense to distribute sdists, because sdists don't pick up data files specified in the package_data argument to setup(). Also, it isn't a huge deal if we don't distribute sdists for our packages. Most PyPI projects only release wheels and pip will also use wheels if available. So, this made sense!
This commit is contained in:
parent
e20b754498
commit
072d43b7c3
|
@ -41,9 +41,6 @@ def _generate_dist(dist_type, setup_file, package_name, setup_args):
|
||||||
)
|
)
|
||||||
print(crayons.green(message, bold=True))
|
print(crayons.green(message, bold=True))
|
||||||
|
|
||||||
def generate_sdist(setup_file, package_name):
|
|
||||||
_generate_dist('sdist', setup_file, package_name, ['sdist'])
|
|
||||||
|
|
||||||
def generate_bdist_wheel_universal(setup_file, package_name):
|
def generate_bdist_wheel_universal(setup_file, package_name):
|
||||||
_generate_dist('bdist_wheel', setup_file, package_name,
|
_generate_dist('bdist_wheel', setup_file, package_name,
|
||||||
['bdist_wheel', '--universal'])
|
['bdist_wheel', '--universal'])
|
||||||
|
@ -69,12 +66,6 @@ def cleanup(package_dir):
|
||||||
print(crayons.green('Removing {}/*'.format(directory), bold=True))
|
print(crayons.green('Removing {}/*'.format(directory), bold=True))
|
||||||
shutil.rmtree(directory)
|
shutil.rmtree(directory)
|
||||||
|
|
||||||
if package_dir.endswith("zulip_bots"):
|
|
||||||
manifest_file = os.path.join(package_dir, 'MANIFEST.in')
|
|
||||||
if os.path.isfile(manifest_file):
|
|
||||||
print(crayons.green('Removing {}'.format(manifest_file), bold=True))
|
|
||||||
os.remove(manifest_file)
|
|
||||||
|
|
||||||
_rm_if_it_exists(build_dir)
|
_rm_if_it_exists(build_dir)
|
||||||
_rm_if_it_exists(temp_dir)
|
_rm_if_it_exists(temp_dir)
|
||||||
_rm_if_it_exists(dist_dir)
|
_rm_if_it_exists(dist_dir)
|
||||||
|
@ -235,7 +226,6 @@ def main():
|
||||||
|
|
||||||
for setup_file in setup_py_files:
|
for setup_file in setup_py_files:
|
||||||
package_name = os.path.basename(os.path.dirname(setup_file))
|
package_name = os.path.basename(os.path.dirname(setup_file))
|
||||||
generate_sdist(setup_file, package_name)
|
|
||||||
generate_bdist_wheel_universal(setup_file, package_name)
|
generate_bdist_wheel_universal(setup_file, package_name)
|
||||||
|
|
||||||
set_variable(bots_setup, 'IS_PYPA_PACKAGE', False)
|
set_variable(bots_setup, 'IS_PYPA_PACKAGE', False)
|
||||||
|
|
Loading…
Reference in a new issue