Johnzy
Johnzy

Reputation: 163

tool generated from setuptool needs alias name

I have a tool that generates whl setup package from setuptool. It's old name is "a_tool". It's setup code is below:

name="a_tool",
version=__version__,
packages=find_packages(
    exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),

Now I need to change the name of the tool to "b_tool", but also I need to have compatibility to older codes with has imports like this:

from a_tool import a_module

How can I achieve this?

Upvotes: 1

Views: 49

Answers (1)

nlloyd
nlloyd

Reputation: 2036

I've had to so something similar and ended up doing what is described in a similar question / answer.

Basically, make another top-level module and have it point to the existing module.

Upvotes: 1

Related Questions