Wednesday, 22 August 2012

Setuptools' include_package_data does not work

MANIFEST.in not honoured during install phase

The python package setup procedure appears to be a mess, you have setuptools, distutils, distutils2 on the way and something new in Python3. All I set out to do was to fix the installation setup.py in django-simplemenu package which was omitting the not python plain locale directory but instead got myself involved a 3 hour roller coaster.

Including sub directories and non python files as part of package

There are two ways: MANIFEST.in file and package_data setup.py option. The latter is Pythonic but doesn’t do recursive includes - so you would have to list every sub directory - and can not include files in the root top most folder; sure once could write a python function to do this but why the complexity? MANIFEST.in with its file/directory pattern matching and with the setup.py's ``include_package_data`` option fits the bill:

``include_package_data``
    If set to ``True``, this tells ``setuptools`` to automatically include any
    data files it finds inside your package directories, that are either under
    CVS or Subversion control, or which are specified by your ``MANIFEST.in``
    file.  For more information, see the section below on `Including Data
    Files`_.

The problem is that does not work, files specified in MAIFEST.in weren't being copied during install. After searching and trial an error the solution was to use distutils instead of the setuptools package. So if you are having issues import distuitls rather then setuptools.

My django-simplemenu setup.py

from distutils.core import setup
from setuptools import find_packages
package = __import__('simplemenu')
setup(name='django-simplemenu',
    version=package.get_version(),
    url='http://github.com/danielsokolowski/django-simplemenu',
    license='BSD',
    description=package.__doc__.strip(),
    author='Alex Vasi , Justin Steward , Daniel Sokolowski ',
    author_email='unemelpmis-ognajd@danols.com',
    include_package_data=True, # this will use MANIFEST.in during install where we specify all of our additional files
    packages=find_packages(),
    # Below is not needed as we are utilizing MANIFEST.in 
    #package_data={'simplemenu': ['locale/en/LC_MESSAGES/*', 
    #                             'locale/ru/LC_MESSAGES/*']
    #              },
    scripts=[],
    requires=[],
    )

My django-simplemenu MANIFEST.in

include LICENSE
include README.rst
recursive-include simplemenu *.py
recursive-include simplemenu/locale *
prune simplemenu/migrations

105 comments:

  1. I am really impressed with your writing skills.Passbeemedia Good job

    ReplyDelete
  2. This article is well thought out and full of good information. Many Thanks for Real estate services las vegas taking time to bring this together into one article.

    ReplyDelete
  3. I really appreciate the kind of topics you post here. It great information that is article actually helpful. sales copy

    ReplyDelete
  4. That was extremely enlightening and exceptionally diverting for me. A debt of gratitude is in order regarding posting Really Such Things. Digital Marketing

    ReplyDelete
  5. All health news is providing the best Garcinia Cambogia and green coffee online in best prices. If you are looking to buy best quality Garcinia Cambogia, Then you should buy from us,

    ReplyDelete
  6. Hey great stuff, thank you for sharing this useful information and i will let know my friends as well.vietnam tours

    ReplyDelete
  7. Keep up the good work. This article might have some more good information on this same topic. I didn't read it till now. But one of my friends recommended me. man+melting+phrases

    ReplyDelete
  8. Ich finde euch einfach SPITZE! Toll dass es mehr von uns gibt die sich für Tiere interessieren! Ich wünsche euch alles Gute. Falls Ihr mal Tierbedarf sowie Tiernahrung sucht. Schaut doch auch mal bei uns vorbei.aqua-rite salt cell

    ReplyDelete
  9. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.safaris in botswana

    ReplyDelete
  10. This really is a wonderful posting, thanks a lot for telling.I am looking forward to discover more fantastic blog posts as this one particular! travel insurance singapore

    ReplyDelete
  11. John arnold is an academic writer of the Dissertation-Guidance. Who writes quality academic papers for students to help them in accomplishing their goals.
    CONSUMERS SURPLUS

    ReplyDelete
  12. Mike Jasson is an academic writer of the Accounting Assignment Help. Who writes quality academic papers for students to help them in accomplishing their goals.
    Machinery Account Homework Help

    ReplyDelete
  13. Mike Jasson is an academic writer of the Accounting Assignment Help. Who writes quality academic papers for students to help them in accomplishing their goals.
    Matlab Builder JA Matlab Help

    ReplyDelete
  14. I appreciate your efforts in preparing this post. I really like your blog articles.
    Supply Chain Management assignment help

    ReplyDelete
  15. This is really great work. Thank you for sharing such a useful information here in the blog for students.
    Business tax incentives case solution

    ReplyDelete
  16. I loved the way you discuss the topic great work thanks for the share. Econometric Analysis Stats Homework Help

    ReplyDelete
  17. yeah it was such an awesome blog that i have updated.. :)
    Assignments Online Homework Help

    ReplyDelete
  18. Mike Jasson is an academic writer of the Accounting Assignment Help. Who writes quality academic papers for students to help them in accomplishing their goals. Christmas Wishes
    Happy Valentine's Day 2016
    Valentine Week 2016

    ReplyDelete
  19. I have no words to appreciate this post ..... I'm really impressed with this post betaalbare website jakency.be

    ReplyDelete
  20. nice work Admiring the time and effort you put into your blog and detailed information you offer.Thanks.

    ReplyDelete
  21. Republic Day 2016 Slogan | Poster | Sayings

    Happy Republic Day 2016 Whatsapp Status & Whatsapp DP

    Famous Republic Day Images with Quotes on 26th January 2016

    Happy Republic Day 2016 Speech | Essay | Paragraph for School Students

    Happy Republic Day 2016 Quotes in English

    Happy 26th January Republic Day Pictures

    Indian Flag Pictures – Images for Republic Day 2016 (गणतंत्र दिवस)

    Happy Republic Day 2016 Sms Wishes

    Happy Republic Day 2016 Quotes in Hindi

    Why is Republic Day Celebrated in India on 26th January

    http://republicdayquotes2016.com
    http://republicdayquotes2016.com/happy-26th-january-republic-day-pictures/
    http://republicdayquotes2016.com/indian-flag-pictures-images-for-republic-day-2016/
    http://republicdayquotes2016.com/happy-republic-day-2016-sms-wishes/
    http://republicdayquotes2016.com/happy-republic-day-quotes-in-hindi/
    http://republicdayquotes2016.com/why-is-republic-day-celebrated-in-india-on-26th-january/
    http://republicdayquotes2016.com/happy-republic-day-2016-quotes-in-english/
    http://republicdayquotes2016.com/happy-republic-day-2016-speech-essay-paragraph-for-school-students/
    http://republicdayquotes2016.com/republic-day-2016-slogan-poster-sayings/
    http://republicdayquotes2016.com/happy-republic-day-2016-whatsapp-status-whatsapp-dp/
    http://republicdayquotes2016.com/famous-republic-day-images-quotes-26th-january-2016/

    ReplyDelete
  22. This post is really astounding one! I was delighted to read this, very much useful. Best Crossover SUVs

    ReplyDelete
  23. I was surfing net and fortunately came across this site and found very interesting stuff here. 2017 SUVs

    ReplyDelete
  24. This sote good job friends, i hope success for you and good luck ! garden gnomes walmart

    ReplyDelete
  25. Want to surprise your mother on this mothers day????
    Visit my blog for Mothers Day Gift Ideas 2016,Celebrate Mothers Day 2016 with your mother...

    Mothers Day Gift Ideas 2016

    Mother's Day Gift Ideas 2016

    Mothers Day 2016

    ReplyDelete
  26. It is better for you to review resumes writing service in case you need to refer to them to get a winning resume. It would be helpful as you will know what to wait from them and their service.

    ReplyDelete
  27. I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me…Small Kids ATVs

    ReplyDelete
  28. Numerous people will be benefited from your writing. BATHROOM SUPPLIES Sydney

    ReplyDelete
  29. it's my first visit at this site, and piece of writing is
    actually fruitful in favor of me, keep up posting these articles. Plantation Resort Injury Lawyer

    ReplyDelete
  30. First of all Good day! I would just like to give thanks to the admin who posted this one I really appreciate it thank you.Trademark Attorney Ft Lauderdale

    ReplyDelete
  31. I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.Half up half down hairstyle

    ReplyDelete
  32. I discovered so numerous interesting stuff in your weblog especially its discussion. From the tons of comments.emergency electrician perth

    ReplyDelete
  33. Truyen ngon tinh hay la the loai truyen tinh cam
    Truyen teen hay la nhung truyen tinh yeu tuoi teen
    Don doc tai trang doc truyen online.

    ReplyDelete
  34. This is the best way to share the great article with everyone one, so that everyone can able to utilize this information.80's Costumes

    ReplyDelete
  35. Great article. Want to know about Samsung Galaxy S8? visit this site.

    ReplyDelete

  36. Have you notice the new Best LG G5 Case ? its awesome

    ReplyDelete
  37. Great article..Do you want to check out Galaxy Note 6? visit my site

    ReplyDelete
  38. Great too the superb examine! Which will write-up is frequently acceptable an additional distinctive These kind of evening you'll uncover prepared, incorporates appointed many people. Keep obtaining of which inturn. globalgroundinc.com

    ReplyDelete
  39. I gathered useful information on this point . Thank you posting relative information and its now becoming easier to complete this assignment
    unblocked games
    unblockedgames

    ReplyDelete
  40. Great article. Want to know about fifa 17 Release Date ? visit this site

    ReplyDelete
  41. I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information.Beautiful half up half down hairstyles

    ReplyDelete
  42. Human Resource Cases Solution and Analysis, Human Resource Cases Solutions, Custom solved according to your need.
    Human Resource Case Solutions

    ReplyDelete
  43. This topic has always been one of my favorite subjects to read about. I have found your post to be very rousing and full of good information. I will check your other articles shortly.
    Limo service Annapolis

    ReplyDelete
  44. Indeed decide this genre of fabulous domain you entertain thoroughfare should you be. Dazzling persuade lode in increase to a heinous triumph for the compatible outing currently i increment stunned you should desolate suggest accomplished this favorable of.Goedkoop vliegen zocht u? Geen probleem, uw zoektocht is voorbij!

    ReplyDelete
  45. Pleasant Post !! I like it, it additionally includes a great deal of helpful certainties. on account of share your experience.
    TheCaseSolutions.com Review

    ReplyDelete
  46. Pleasant Post !! I like it, it additionally includes a great deal of helpful certainties. on account of share your experience.
    TheCaseSolutions.com Review

    ReplyDelete
  47. This was nice and impressive post i really like it you do the great work i read this post and it was incredible and outstanding thank you so much for sharing this info with us.
    PCNSE6 vce

    ReplyDelete
  48. Impressive one. For all hardcore gamer, specially for PS gamer, a new supportive- ps3 emulator article.

    ReplyDelete
  49. All things considered, nothing I can say except for incredible! I trust you'll make more helpful articles in the up and coming days.
    The Gold Story Case Solution\

    ReplyDelete
  50. Euro Cup is just round the corner. Do you know which teams will take on each other in the first game? Check it out France vs Romania Live Streaming and stay updated with all the latest news.

    ReplyDelete
  51. learn to never give up, you have to learn the power and wisdom of site hereunconditional surrender, and that one doesn’t cancel out the other;SEO West Palm Beach

    ReplyDelete
  52. Another incredible post, I value all the work you put into this site, assisting others with your fun and inventive works.
    Niagara Health System: An Innovative Communications Strategy (A) Case Solution

    ReplyDelete
  53. The blog or and best that is extremely useful to keep I can share the ideas
    of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    strike force heroes| slitherio | earn to die 2
    earn to die 5| goodgame empire |tank trouble 2

    ReplyDelete
  54. I am to a great degree astonished at what I found here. It is a remarkable Article. Much obliged to you much.
    Arena Modelling Homework Help

    ReplyDelete
  55. Media programmes have got suddenly grow to be hot property and so are vying regarding attention together.e-learning platform

    ReplyDelete
  56. I want to thank you for this enlightening read, I really appreciate sharing this great post. Keep up the good work.
    Tea packing machine manufacturer, tea packaging machine

    ReplyDelete
  57. If you love cats, you must check out my blog Happy National Cat Day
    which is solely dedicated to cats. Learn everything you want to know about cats and stay updated. Enjoy with your pets on Cat Day and make her feel special.

    ReplyDelete
  58. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.lawyer key west

    ReplyDelete
  59. To get high quality new year wallpapers, happy new year quotes, happy new year wishes and more,
    just have a look at my site Happy New Year 2017 and
    enjoy the first day of the year with your near and dear ones.

    ReplyDelete
  60. This is one of the cult game now, a lot of people enjoy playing them . Also you can refer to the game :
    gold mine strike | pokemon go 2
    The game controls are shown just under . Movement mechanisms primarily include acceleration and tilting controls.
    stickman games | stick war 2 | animal jam 2

    ReplyDelete

  61. Have you heard about National Black Cat Day which is two days prior to National Cat Day.
    Check out my blog to get all the latest information about it and stay updated.

    ReplyDelete
  62. i enjoyed your standpoint on this. I wanted to know you that I 'm a big fan of mobile game and I love to locate latest game trick and tips. now a days I am playing pixel gun 3d game and I love it as that is a good shooting game, I'm also discovering exactly the same pixel gun cheats if you realize any pixel gun tips web site subsequently plaease refer me and will certainly visit the site of pixel gun 3d guide. thanks and yes.. you are amazing.

    ReplyDelete
  63. hi there, your point of view is totally agreed and really apreciated. hope will soon hear from you on this topic again. by the way, i was searching for the best way to get resources for simcity buildit game and just surfing over the net and suddenly found your blog. it was worth reading and i really enjoyed your topic. well i love simcity buildit and am feeding my incomplete dream of becoming a mayor in virtual world. actually i was researching on simcity buildit simcash and was in the need of game resources. if anyone here feeling the same problem and has the answer then please comment the same so that i can find simcity buildit cash for free. and thanks again for this wonderful reading.

    ReplyDelete
  64. Just like in brick and mortar stores you can also find discount shopping online as like anything else you can find anything you want with only a few clicks of the mouse. While the brick-and-mortar is a plus for getting outdoors it can also be inconvenient and stressful.flat icons

    ReplyDelete
  65. Investment Centers Assignment and Online Homework and Project Help - Investment Centers Term paper for Some profit centers also qualify as investment. Investment Centers Accounting Assignment Help

    ReplyDelete
  66. Our website is number 1 in ASP Assignment Help and ASP.net Homework Help. This is preferred destination for various students to get their ASP Projects and Homework Done. ASPHelpOnline.com is easily the number 1 destination to get ASP help. Help With Asp.net Programming

    ReplyDelete
  67. Cost of Auditor Auditing Homework Help, Online Auditing Assignment & Project Help Development of Cost Audit Profession: Cost of Auditor Assignment Help

    ReplyDelete
  68. Mechanical Engineering AutoCad Assignment Help, Online AutoCad Homework & Autocad Project Help Mechanical Engineering AutoCAD Help Introduction Mechanical engineering is a broad field that incorporates market, company, medication as well as law. Mechanical Engineering Assignment Help

    ReplyDelete
  69. Work Area ColdFusion Help, ColdFusion Assignment & Homework Help, ColdFusion Project. The Studio work area consists of three separate, but interrelated, panes- the Edit pane. Work Area ColdFusion Project Help

    ReplyDelete
  70. Data Management MathCad Help, MathCad Assignment & Homework Help, MathCad Project Help. Many of Mathcad's built-in functions and operators are useful for manipulating sets of data. Data Management MathCad Project Help

    ReplyDelete

  71. Great article. Thanks for sharing. This is really helpful to me. I appreciate your effort. Looking forward to reading more articles of yours.
    Have a look at Veterans Day 2016 if you want to know about veterans day,
    which is one of the most important holidays in the U.S and why is it celebrated. Stay updated with all the latest information.

    ReplyDelete
  72. Hey there, You've done an excellent job. I will definitely digg it and personally suggest to my friends. I am confident they will be benefited from this site. Buy Driftwood Mirrors Attention Driftwood mirror and table lovers!! the latest range of driftwood at prices your eyes will never believe!! Hurry!


    ReplyDelete
  73. On the off chance that you aren't sufficiently granted cash in government understudy advances to see you through, you should consider and begin looking at private undergrad understudy credits. Banks will loan you cash to help with your school expenses and everyday costs, except dissimilar to with the government advances, these are all subject to a credit check. www.usacheckcashingstore.com/corona

    ReplyDelete
  74. This, thusly, will help you purchase a superior auto, get the house you need, or wind up with a lower rate Mastercard. However, in what capacity can an obligation union understudy advance can help you increment your credit? Consider a portion of the measures utilized by FICO assessment organizations reporting. usacheckcashingstore.com/corona

    ReplyDelete
  75. Should there be another persuasive post you can share next time, I’ll be surely waiting for it.Brazil Honeymoon Resort

    ReplyDelete
  76. Hi buddy, your blog' s design is simple and clean and i like it. Your blog posts about Online Dissertation Help are superb. Please keep them coming. Greets!!
    Mechanical Engineering Capstone Project Writing Service

    ReplyDelete
  77. DO My C Homework
    Hi buddy, your blog' s design is simple and clean and i like it. Your blog posts about Online Dissertation Help are superb. Please keep them coming. Greets!!

    ReplyDelete
  78. Hi buddy, your blog' s design is simple and clean and i like it.University Essay Writing Service
    Your blog posts about Online Dissertation Help are superb. Please keep them coming. Greets!!

    ReplyDelete
  79. Hi buddy, your blog' s design is simple and clean and i like it. Your blog posts about Online Dissertation Help are superb. Please keep them coming. Greets!!
    help with economics homework

    ReplyDelete

  80. Jobs Chat is one of the biggest Indian Job Site so here you will getAll Government jobs Syllabusso

    ReplyDelete
  81. good certainly unable to make use of Wi-fi Connection even they are www.wifikillpro.com the fact that all the rate diverted to your device. You can make nice.

    ReplyDelete
  82. good PC to PC transfers are the trickiest in the typical shareitforpcdl.com given by SHAREit. SHAREit for PC is the most convenient method best.

    ReplyDelete
  83. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing

    subway surfers | crossword puzzles

    ReplyDelete
  84. Happy Valentines Day Wishes
    Happy Valentines Day Quotes
    Happy Valentines Day 2017 Images
    Red Rose HD Images Rose Day 2017
    Valentine Week List
    Valentine Week List 2017
    Valentine's day tips
    Valentines Day
    14th feb 2017


    You can celebrate this Valentines Day with us. We are hosting a mega party for everyone. We would love to have you with us this year. We are celebrating through Valentine Week 2017.

    ReplyDelete
  85. This point has dependably been one of my most loved subjects to peruse about. I have observed your post to be exceptionally energizing and brimming with great data. I will check your different articles in the blink of an eye.how to send money abroad

    ReplyDelete
  86. good offline, with no web. So this is the very best service, by iTube itubedownloadappz whatever concerning ways to download iTube for PC, and you nice.

    ReplyDelete