When reading the code, the key points of things to do should be noted. In fact, I should do this work at a very beginning time, but now I just can remind myself to do it.
Basic requirements of ‘develop’ command:
Requirement 1: ‘develop’ should be a kind of Command
In setuptools, ‘develop’ is just a kind of ‘easy_install’ command, which means ‘develop’ class derives from ‘easy_install’ class. While in packaging module, there is not such kind of ‘easy_install’ class, so some changes should be considered.
Requirement 2: ‘develop’ should support several useful options
In setuptools, ‘develop’ not only has its specific options, but also supports all of ‘easy_install’ options. It maybe just necessary to implement its specific options in packaging module, but I’m not sure. So, I write these here just for future possible reason.
What does ‘develop’ do in distutils(Not compelte though; what just I know and can remember)?
Does 1: Create egg_info files and build extensions if necessary
Because packaing uses .dist-info directory to hold metadata instead of egg_info, new apis from packaging should be adopted in develop class.
Does 2: Add an entry in easy_install.pth to let anyone can import it just like it’s installed
In packaing module, there isn’t easy_install.pth in site-packages directory, so to let anyone can import it, it’s still necessary add a .pth file in site-packages, but we can improve – .pth file created by ‘packaging’ module should not contain magic words in the form of ‘import’ keywords. We can also add the Tarek’s consideration to implement it in a perfect way (see previous MLs).
Does 3: Create a wrapper script
It’s easy, and also easy to implement with new apis offered by ‘packaing’ module.
Does 4: Create an .egg-link file
It is just used to let setuptools know this tool has been installed on this computer now. But it seems that ‘packaging’ has a more advanced solution, so it maybe easy to implement.
Anyway, the above is all I can remember from days’ studying and reading, and I think more new content will be added in future, but it’s a very good way to help promote future coding.