Sunday, May 2, 2010

Python distutils and manifest files (Visual Studio 2010)

Visual Studio 2005 introduced a new deployment model for Windows client applications based on isolated applications and side-by-side assemblies. The redistributable libraries (such as MFC, ATL, CRT) have been rebuilt as shared side-by-side assemblies and installed in the native assembly cache, WinSxS folder in Windows. This has provided a common location for particular versions of the dll-s and the applications had to declare their dependencies by using a manifest file. The manifest file is an XML file which contain references to the dependent dlls located in WinSxS, these files had to be deployed along with every dll or executable which depend on the redistributables. Without having the manifest (either by a separate file or embedded in the executable as a resource) the application generates an error.
Though the purpose of this change was to simplify deployment, the result was probably the opposite. As a result Microsoft changed deployment requirements in Visual C++ 2010. As of Visual Studio 2010 Microsoft has backed out the manifest generation and no manifests are generated by default with the VC2010 builds. There's no requirement to embed manifests in the executables anymore and CRT-s need not be installed in WinSxS. All you need to do is copy the VC++ dependent DLLs to the application folder and run.

This change may however cause issues for those build systems (like python distutils) which don't expect that the manifest may eventually be missing and stop the compilation in this condition. I don't see any change in this regard in the python SVN trunk either. Fortunately to prevent from this issue we could easily alter the corresponding file (/Lib/distutils/ to something like:

   # embed the manifest
   # XXX - this is somewhat fragile - if mt.exe fails, distutils
   # will still consider the DLL up-to-date, but it will not have a
   # manifest. Maybe we should link to a temp file? OTOH, that
   # implies a build environment error that shouldn't go undetected.
   if os.path.isfile(temp_manifest):
        mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2
        out_arg = '-outputresource:%s;%s' % (output_filename, mfid)
             self.spawn(['mt.exe', '-nologo', '-manifest',
                  temp_manifest, out_arg])
        except DistutilsExecError as msg:
              raise LinkError(msg)
              log.debug("skipping %s (up-to-date)", output_filename)

Which may work even if the deployment model will frequently be altered by Microsoft from versions to versions ;-)


  1. I’m very affectionate of your blogging and redistribution. Gamingguide

  2. Asupan makanan hasil rekayasa genetika dapat memicu peningkatan jumlah makanan sebagian besar berdasarkan situs jayatogel online terpercaya reaksi alergi. Mentransfer gen dari makanan yang menyebabkan alergi pada banyak orang dapat menyebabkan makanan baru di mana gen dipindahkan ke sifat alergen yang sama. Karena modifikasi makanan ini membutuhkan penggunaan bakteri dan virus munculnya gangguan terbaru yang situs totobet terbaik dapat mempengaruhi kesehatan manusia dan menimbulkan tantangan lingkungan pada kenyataannya merupakan kenyataan yang berlarut-larut.

  3. In India over 400 examinations are conducted every year and the exams are generally classified on the basis of the domain or field of study. Basically, they are bifurcated as Engineering, Law, Medicine, MBA, Design, Pharmacy, Computer Application, Finance and Accounts. These entrance exams take a toll of the candidate who aspires to crack it but with proper knowledge regarding how to top an exam, one can easily clear it. This page intends to furnish relevant information about the exam and the best ways to crack them.The best mba college in ghaziabad have all the courses which are good for the education system and in this management you can get top engineering college in uptu is also convenient for all.

  4. Are you searching for employment practice in Hyderabad? Did you discover one yet? It’s a troublesome nut to crack as a result of every job consultancy in hyderabad is totally different completely and offers different services. Before selecting one, the individual must aid analysis on what services they need and what expectations they need from the task practice in Hyderabad. Their square measure varied choices accessible. select what’s best for you.

  5. From the day I have started the software engineering studies until now, I have faced numerous difficulties in getting my hand on python perfectly. As one of my friends has recommended online academic help, which she is using for getting affordable nursing essay writing services for her academic help. She suggested that contacting them can lead me to someone who will help me with this trouble. Well, I have my fingers crossed and looking forwards to getting the best help for my coding assignments.

  6. What an amazing post you are sharing here you describe in well-mannered. I am really wonder reading this and welcome method of writing an article on mobile patrol security services.

  7. Selecting our gorgeous, verified, and experienced Independent Escorts Service and Call Girls in Aerocity would provide you spellbinding escort services that will offer you complete fulfillment and satisfaction and leave a long-lasting impression on you.Your Aerocity tour is always half-done without our Call Girls in Aerocity the real beauty in the city. We have the most gorgeous,Its so much insist of our loved customers our agency is happy to provide our Call Girls in Aerocity. We have hot and sexy females who are ready to hookup. Everyone are respectful with a quiet character. We have a wide range of Female escorts in Aerocity. Simply call us and recruit via given whatsapp option to the footer section.we are accessible day in and day out all over in Aerocity.To hire our Call Girls in Aerocity, you can speak with our call girl representative over the call. It is effortless to get Call Girls in Aerocity now. So, let us tell you about the benefit of our Call Girls in Aerocity because when you first desire something, you look for the pros of that thing. Call Girls in Aerocity, Delhi. One of the oldest Agency over hundreds of customer satisfatiction.

  8. Hello guys you! You will meet many Aerocity escorts but she will not give you full satisfaction. If all of you want to real & erotic satisfaction then you booked your Adorable Escorts Service in Aerocity. And take full enjoy with Gratifying Aerocity escorts services. Escorts Service in Aerocity perfectly delightful movements and they are ready for sensuality anytime you crave.You will be able to find Hot Escorts Service in Aerocity, Elite escorts, and others as well. There are galleries for all of these girls, making it easy for you to hand-select the girl you want to spend time with. Booking requires a simple phone call. Escorts Service in Aerocity are often available day and night. The sooner you book, the easier it will be to have a larger selection. The girls working with our Delhi escort agency as escorts are college girls, Escorts Service in Aerocity, and housewives. Our other young babes such as the College Escorts from Model Female Escorts Service in Aerocity and Mahipalpur agency are light-hearted and always seem to have a spring in their step.Individuals who are not wedded or have enormous sex advance ought to employ a Escorts Service in Aerocity escort young girl like me to get unwind.

  9. I really liked reading your article. I am also a blogger, I know how hard it takes to write a blog or article. You will keep bringing articles on new topics like this, I appreciate it. smsf audit

  10. Python is a programming language. Its design philosophy emphasizes code readability with its use of significant indentation. It is developers favourite choice and Buy Dissertation Online is also developed on Python. Do you like it?

  11. When you think that your child is in need of care since you don't understand their needs then there are special pediatric home health agencies that can take good care of you child with professional staff observing your child and take care of their basic needs.