What's a good word for "to turn into a library"?
Solution 1:
Packaging sounds most correct to me. The most important defining property of a software library is that it's a self-contained, well, package.
Software libraries and the constructs used to organise and distribute them are often termed "packages": Here's Java's, Python's and Perl's. Even languages that don't have them as an explicit language feature speak of "implementing packages" as in Lua.
All of a guide on "How to Package Your Python Code", a "Lua Packaging Guide" and various questions on StackOverflow tagged "packaging" use the word to mean putting code into a form useable by others.
Solution 2:
"Archiving", "linking", or perhaps "cataloguing"? The UNIX 'ar' tool (short for archiver) is used to build static libraries; and a linker is used to build dynamic (shared) libraries. These cover the technical side of creating a library.
If you're looking for a broader description of the whole process, "packaging" is probably the most appropriate.