Skip to content

Commit

Permalink
Do not autoremove prototype in release branch (#3663)
Browse files Browse the repository at this point in the history
So that release engineering team does not have to manually remove prototype-related things
in each release
  • Loading branch information
mthrok authored Oct 19, 2023
1 parent 7ea108f commit d00df95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,6 @@ def run(self):
shutil.rmtree(str(path), ignore_errors=True)


def _get_packages(branch_name, tag):
exclude = []
exclude_prototype = False
if branch_name is not None and branch_name.startswith("release/"):
exclude_prototype = True
if tag is not None and re.match(r"v[\d.]+(-rc\d+)?", tag):
exclude_prototype = True
if exclude_prototype:
print("Excluding torchaudio.prototype from the package.")
exclude.append("torchaudio.prototype*")
return find_packages(where="src", exclude=exclude)


def _parse_url(path):
with open(path, "r") as file_:
for line in file_:
Expand Down Expand Up @@ -140,7 +127,7 @@ def _main():
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
packages=_get_packages(branch, tag),
packages=find_packages(where="src"),
package_dir={"": "src"},
ext_modules=setup_helpers.get_ext_modules(),
cmdclass={
Expand Down
File renamed without changes.

0 comments on commit d00df95

Please sign in to comment.