Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to platter a django project? #35

Open
musicformellons opened this issue Feb 19, 2016 · 1 comment
Open

How to platter a django project? #35

musicformellons opened this issue Feb 19, 2016 · 1 comment

Comments

@musicformellons
Copy link

Maybe I should read up on setuptools, packaging, requirements etc. for another day or so, but I was hoping someone could guide me somewhat.

I can run platter etc fine and it indeed makes a nice tarball but I am pretty sure it is not 'everything I need/ would like'. I was hoping to package (preferably in one tarball or otherwise two separate ones):

  1. my Django project/app
  2. the 'virtualenv' with all requirements of my project under 1.

This would be an easy way to deploy the project and make me "pypi independent" (can still deploy even when pypi is 'down' etc.). Actually this would be nice compared to setting up Docker etc.

I use this simple setup.py script:

from setuptools import setup, find_packages

setup(
    packages=find_packages(),  # include all packages under src
    # package_dir={'': 'src'},  # tell distutils packages are under src
    # include_package_data=True,  # include everything in source control
    # ...but exclude README.txt from all packages
    exclude_package_data={'': ['README.txt']},
)

I tried putting it in my django project root; and also tried putting in the root of my virtual environment. In both cases it does platter something but I do not think it packs all my requirements...

I could continue with specifying my 'requirements' in my setup.py file but I am not sure whether you can specify versions etc and whether this is the way to go.

My questions:

  1. Does platter suit a Django project deployment including all (pip) requirements?
  2. If yes how to go about?
@musicformellons
Copy link
Author

As I read this:
http://python-packaging-user-guide.readthedocs.org/en/latest/requirements/

it says: "It is not considered best practice to use install_requires to pin dependencies to specific versions", however it seems me the most logic way for me to proceed. Please comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant