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 8667707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:02:10+00:00 2026-06-12T18:02:10+00:00

The project I’m working in uses fabric for many build steps and requires a

  • 0

The project I’m working in uses fabric for many build steps and requires a offline build as fallback.

I’m currently stuck at installing python packages provided in tarballs.

The thing is I have trouble getting into the newly extracted directory and running setup.py install in there.

@task
def deploy_artifacts():
    """Installs dependencies from local path, useful for offline builds"""
    #TODO: Handle downloading files and do something like this bellow
    tmpdir = tempfile.mkdtemp()
    artifacts_path = ''
    if not 'http' in env.artifacts_path:
        artifacts_path = env.artifacts_path

    with lcd(artifacts_path):

        for f in os.listdir(artifacts_path):
            if 'gz' in f:
                put(f, tmpdir)
                tar = os.path.join(tmpdir, f)
                target_dir = os.path.join(tempfile.gettempdir(), normalize(f))
                if not files.exists(target_dir):
                    run('mkdir %s' % target_dir)
                else: 
                    run('rm -rf %s' %target_dir)
                    run('mkdir %s' % target_dir)
                run('tar xf %s -C %s' % (tar, target_dir))
                run('rm %s' % tar)
                with cd(target_dir):
                    sudo('python setup.py install')

I come from reading the tar man page for the bazillion time and I got nowhere near to getting what I want.

Did some of you face a situation like this? is there some other (read: better) approach to this scenario?

  • 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-06-12T18:02:12+00:00Added an answer on June 12, 2026 at 6:02 pm

    There’s nothing wrong (in principle) with what you’re trying do. Maybe just take smaller steps getting there. Rather than using temporary directories, it might make debugging easier if everything was put in a systematic location that has known permissions that nothing else writes to by convention. At least that would let you use some combination of fabric and manual intervention to check what is going wrong.

    In the longer term, there are a few alternatives that I see. For simplicity you want the online and offline versions to work the same way, and that means fetching packages using easy_install / pip for both cases.

    One way to do this is to build a mirror of PyPi. The right way to do this if you’ve got plenty of storage space (30Gb) is to use software that implements PEP381 (Mirroring Infrastructure for PyPI), there is already a client that does this (pep381client). A number of other projects are available that do similar things (basketweaver, djangopypi2, chishop).

    An alternative is to consider a lighter weight proxying scheme. I’ve been looking a pip2pi and pipli. I’m unsure if they will work directly with easy_install, but it would be worth a try.

    It’s also worth noting that if you were using pip, you could have installed directly from the tarballs.

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

Sidebar

Related Questions

Project I'm working on uses jQuery. I have a series of Ajax calls being
The project i am working at right now requires some declarative way of defining
The project that I am working on (Node.js) implies lots of operations with the
The project currently has a UIviewController called Dashboard that acts as the main view
My project is ARC enabled (the build settings have Objective-C Reference Counting set to
Project Requirements: I need to build a web service that will receive chunks of
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
Current project is an Mvc4 application, I had Ioc working and recently it just
My project is in XCode 4.2. This project compiles for a regular debug build.
project: Using VB.NET to build a winforms database interface and work-automation app. I am

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.