The job progress is a little slow, because I didn’t get the right working copy at the beginning time soonly and it’s a bit difficult to construct a good example showing the usage of current packaging. There are several potential components to complete all ‘packaging’ promises to do; saying ‘potential’ here means that the packaging is still under development and many concepts or components would be changed in future version. What’s more, the online documents are also under development and the content of them is not complete and consistent with other resources, and it also took me a lot of time looking for these resources, but only got limited and sometimes chaotic information.
The above is just some complaint showing the difficult situation I was in this week. But I’m still glad to tell my mentor and others that coding begins – the ‘develop’ command is under development.
Things done this week:
1 Wrote two posts about findings when reading source code and thoughts about what old ‘develop’ command does
2 Got the right copy of cpython 3.3 which contains packaging module then
3 Re-compiled cpython 3.3 and found another bug which I’ll write a post telling about later
4 Read the content Eric commented on my page , useful resource he offered, detail help information he just wrote to clear my misunderstanding, which will help me a lot in future coding (so many thanks)
5 Wrote the function to create .pth file
Actually, I just want to implement ‘develop’ command in the way setuptools has done, so I always tried to find the counterparts in current packaging module. In distutils 1, .pth file is a subclass of an Environment, which has the purpose of collecting .pth information and operating it in a more easy way. There is a ‘create_path_file’ in install_dist.py, so .pth file creation function in ‘develop’ just copied much from it. In addition, we can create the .dist-info directory just by run the command ‘install_distinfo’, so I think it’s not necessary to create a function here, which may vary from initial plan.
So current problems would be: 1) where packaging will permit to install .pth file and is there any kind of ‘install_site_py’ function to check if it is safe to install in that directory ? 2) is there any necessary to create en .egg-link file in the site directory, thus ‘packaging’ module also knows how many distributions are ‘installed’ in development mode, as setuptools does
Just keep reading code and writing-testing new code , I think.
Best wishes to everyone.