Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 634317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:16:52+00:00 2026-05-13T20:16:52+00:00

This question assumes that the python package I want to install is a django

  • 0

This question assumes that the python package I want to install is a django app that includes templates and media files. But the question is valid for any python package that does not only contain .py files.

I’m using buildout to create a re-buildable environment in which I’m developing a django project. My buildout.cfg looks like that:

[buildout]
parts = python
eggs =
  normal-python-package
  python-package-with-data-files
find-files = 
  http://domain-to-python-package-with-data-files

[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

(and some django related stuff). The python-package-with-data-files is available through a link on the page http://domain-to-python-package-with-data-files.

The eggs normal-python-package and python-package-with-data-files are installed successfully in the eggs/ directory. Because python-package-with-data-files has set zip_safe to False in its setup.py file it is available unzipped in eggs/.

Only the non .py files of python-package-with-data-files are not available in the unzipped egg in eggs/ (they are included in the .tar.gz package available at http://domain-to-python-package-with-data-files).

How do I get these data files to be included in the egg? Do I need to change the setup.py file of the package? Or is it buildout related?

The things I found out are the following:

If I make a python setup.py sdist in python-package-with-data-files root directory, all data files are included in the created .tar.gz file. But if I make a python setup.py bdist it results in a build without including the data files.

This makes me think that the problem is not buildout specific. But maybe there is a way to tell buildout not to make a bdist but a sdist to create the egg and install the package into the project.

What shall I do? I am the maintainer of python-package-with-data-files, so I can change setup.py if necessary.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:16:57+00:00Added an answer on May 13, 2026 at 8:16 pm

    It sounds like you need to make use of the package_data keyword argument in your setup.py file, so distutils knows those files should be installed with your package.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 390k
  • Answers 390k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could take the set-theoretic intersection of the coordinates in… May 15, 2026 at 1:04 am
  • Editorial Team
    Editorial Team added an answer Or the algorithm which can assess the "goodness" of the… May 15, 2026 at 1:04 am
  • Editorial Team
    Editorial Team added an answer call javascript function on onkeypresss function copy_data(val){ var a =… May 15, 2026 at 1:04 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.