PIP install a Python Package without a setup.py file?

I'm trying to figure out how I can install a python package that doesn't have a setup.py file with pip. (package in question is http://code.google.com/p/django-google-analytics/)

Normally I would just checkout the code from the repo and symlink into my site-packages, but I'm trying to get my whole environment frozen into a pip requirements file for easy deployment and testing.

Any ideas?


Asked by: Steven937 | Posted: 06-12-2021






Answer 1

Fork the repo and add a working setup.py. Then send a pull request to the author.

Oh, it's on Google Code. Well then, file a bug and post a patch.

If the author refuses to make their code into an installable Python distribution (never happened to me), just host your fork somewhere and put that in your requirements file.

Answered by: Brooke110 | Posted: 07-01-2022



Answer 2

You can't. PIP installs Python packages. That's not a Python package. I've heard that the Django community in general doesn't make much packages, which makes things like what you are trying to do tricky. But that could be wrong.

If you want to freeze your environment you might want to look into Buildout. Other options in this case is to use an svn:external.

Answered by: Owen283 | Posted: 07-01-2022



Similar questions

setuptools python setup.py install not copying all child modules

The package dir structure is this repodir/ -------- setup.py -------- MANIFEST.in -------- bin/ ----------- awsm.sh -------- sound/ ------------ init.py ------------ echo/ ----------------- init.py ----------------- module1.py ----------------- module2.py ------------ effects/ ------------------- init.py ------------------- module3.py ------------------- module4.py setup.p...


setuptools - how to make "python setup.py install" install source instead of egg file?

I used to run python setup.py install in a python project, it will just move the source to site-packages, but sometimes it will mv an egg file to site-packages? #!/usr/bin/env python # encoding: utf-8 from setuptools import setup,find_packages setup( name = "ipin_rpc_gen_vector", version = "0.0.2", packages = find_packages("src"), package...


python - Parse setup.py without setuptools

I'm using python on my ipad and need a way to grab the name, version, packages etc from a packages setup.py. I do not have access to setuptools or distutils. At first I thought that I'd parse setup.py but that does not seem to be the answer as there are many ways to pass args to setup(). I'd like to create a mock setup() that returns the args passed to it, but I am unsure how to get past the import errors. Any help would b...


setuptools - Python "setup.py develop" why is my data package not available?

I have a problem that I can't access my data package after setup.py develop. Here is my setup: setup.py from setuptools import setup, find_packages from posixpath import join, relpath, normpath import os setup( name = 'poc_datapath', version = '1.0', package_dir = { '' : 'target/python', 'resources' : 'target/res'}, packages = find_packages(where='target/python') +...


setuptools python setup.py install not copying all child modules

The package dir structure is this repodir/ -------- setup.py -------- MANIFEST.in -------- bin/ ----------- awsm.sh -------- sound/ ------------ init.py ------------ echo/ ----------------- init.py ----------------- module1.py ----------------- module2.py ------------ effects/ ------------------- init.py ------------------- module3.py ------------------- module4.py setup.p...


setuptools - how to make "python setup.py install" install source instead of egg file?

I used to run python setup.py install in a python project, it will just move the source to site-packages, but sometimes it will mv an egg file to site-packages? #!/usr/bin/env python # encoding: utf-8 from setuptools import setup,find_packages setup( name = "ipin_rpc_gen_vector", version = "0.0.2", packages = find_packages("src"), package...


setuptools - python setup.py sdist and custom setup keywords don't play together

subtitle: Not only sdist I am trying to get the setup.py file of a package I'm working on to play nicely with sdist. The relevant parts of the setup.py file are: from setuptools.command.test import test [...] class Tox(test): "as described in http://tox.readthedocs.org/en/latest/example/basic.html?highlight=setuptools#integration-with-setuptools-distr...


python - How to exclude a single file from package with setuptools and setup.py

I am working on blowdrycss. The repository is here. I want the settings file for blowdrycss_settings.py to be excluded from the final package on pypi. The intention is to dynamically build a custom settings file that will be placed in the users virtualenv / project folder. In setup.py, I have the ...


setuptools - Python setup.py setup() config{}

I'm a beginner in the process of learning how to create a skeleton directory complete with automated tests, install scripts etc. I am a fair ways from understanding all of this process despite the amount of time spent attempting to. At this point in time all I can do in relation to this is make a source distribution and executable installer for a single module. The format of my setup.py (using a template p...


setuptools - Setup.py for Utility Python project

Should/does a utility Python project need a setup.py file? My utility project will train a computer vision model with sample images. It depends on a computer vision python module/package. It will be used internally and not publicly distributed. Is a setup.py file useful or applicable for this kind of Python project?


setuptools - Python setup.py develop vs install

Two options in setup.py develop and install are confusing me. According to this site, using develop creates a special link to site-packages directory. People have suggested that I use python setup.py install for a fresh installation and python setup.py develop after any...


python - Setup.py, , setuptools, cmdclass - Custom commands not working

I am trying to create a directory upon a package installation. The function to create the directory, by itself, successfully creates it. Additionally, when I run "python3.7 setup.py install", the directory is created. Why does this not work when using pip though? I don't see any errors. When I added print statements, I do not see them. I have chosen to use setuptools' 'bdist_egg' function instead of the ...


setuptools - Accessing python egg's own metadata

I've produced a python egg using setuptools and would like to access it's metadata at runtime. I currently got working this: import pkg_resources dist = pkg_resources.get_distribution("my_project") print(dist.version) but this would probably work incorrectly if I had multiple versions of the same egg installed. And if I have both installed egg and development version, then running this cod...


setuptools - How to get the "python setup.py" submit information on freshmeat?

This can submit information about your software on pypi: python setup.py register But there is not a similar command for submitting information to freshmeat. How could I write a distutils.Command that would let me do the following? python setup.py freshmeat-submit


How do I set up Setuptools for Python 2.6 on Windows?

Is there any way to install Setuptools for Python 2.6 in Windows without having an exe installer? There isn't one built at the moment, and the maintainer of Setuptools has stated that it will probably be a while before he'll get to it. Does anyone know of a way to install it anyway?


python - Why does setuptools sometimes delete and then re-install the exact same egg?

I'm trying to install an egg on a computer where an identical egg already exists. Why does it remove the egg and then re-install it? I'm calling easy_install from a script with the options: ['-v', '-m', '-f', 'R:/OPTIONS/Stephen/python_eggs', 'mypkg==1.0_r2009_03_12'] While running the easy_install command this was observed: Searching for mypkg==1.0-r2009-03-12 Best match: ...


python - Excluding a top-level directory from a setuptools package

I'm trying to put a Python project into a tarball using setuptools. The problem is that setuptools doesn't appear to like the way that the source tree was originally setup (not by me, I must add). Everything that I actually want to distribute is in the top-level directory, rather than in a subdirectory like the setuptools docs talk about. The tree has a directory, tests, that I don't want to have in ...


setuptools - Explain Python entry points?

I've read the documentation on egg entry points in Pylons and on the Peak pages, and I still don't really understand. Could someone explain them to me?


python - How can I make setuptools ignore subversion inventory?

When packaging a Python package with a setup.py that uses the setuptools: from setuptools import setup ... the source distribution created by: python setup.py sdist not only includes, as usual, the files specified in MANIFEST.in, but it also, gratuitously, includes all of the files that Subversion lists as being version controlled beneath the package direc...


python - What if setuptools isn't installed?

I'm just learning the art of writing a setup.py file for my project. I see there's lots of talk about setuptools, which is supposed to be superior to distutils. There's one thing though that I fail to understand, and I didn't see it addressed in any tutorial I've read about this: What if setuptools isn't installed? I understand it's not part of the standard library, so how can you assume the perso...


Python setuptools import error (Using NetBeans)

I tried to find a question that would answer to this question but wasn't succesful, so I made a new question. I'm trying to compile my old Python Tic Tac Toe game in NetBeans, but I get the error message ImportError: No module named setuptools In my actual code I haven't imported a module named setuptools. As much as I understand the compiler generates a setup.py file and tries to ...


python - Is there a method to find out if a package is to be installed with distutils instead of setuptools?

I can look inside setup.py I suppose to see if it's a distutils package. But in the process of familiarizing myself with python package management I have noticed that there seems to be more than one way to do it. So: How can I check an unzipped packages directory or setup.py to see how to build it? EDIT: When I say 'build' I mean is it going to use distutils or setuptools, or distribute. I am using build...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top