Switch dependency management to Pipenv
This commit is contained in:
		
							parent
							
								
									f831b22984
								
							
						
					
					
						commit
						acf2b171a9
					
				
					 9 changed files with 400 additions and 77 deletions
				
			
		|  | @ -1,6 +1,8 @@ | |||
| Changelog | ||||
| ========= | ||||
| 
 | ||||
| * :support:`-` use Pipenv for dependency management | ||||
| 
 | ||||
| * :release:`0.2.0 <2018-11-21>` | ||||
| * :feature:`-` fix compatibility with Python 2.7 on Debian Stretch | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,64 +7,17 @@ Install | |||
| Working Environment | ||||
| =================== | ||||
| 
 | ||||
| You have several options in setting up your working environment.  We recommend | ||||
| using virtualenv to separate the dependencies of your project from your | ||||
| system's python environment.  If on Linux or Mac OS X, you can also use | ||||
| virtualenvwrapper to help manage multiple virtualenvs across different | ||||
| projects. | ||||
| To get a running work environment use `pipenv`_. | ||||
| 
 | ||||
| .. index:: virtualenv | ||||
| .. _pipenv: https://pipenv.kennethreitz.org/en/latest/ | ||||
| 
 | ||||
| Virtualenv Only | ||||
| --------------- | ||||
| 
 | ||||
| First, make sure you are using `virtualenv`_. Once that's installed, create | ||||
| your virtualenv: | ||||
| To get started install `pip` and `pipenv` and use `pipenv install --dev`: | ||||
| 
 | ||||
| .. code-block:: sh | ||||
| 
 | ||||
|     $ virtualenv --distribute gvapgsql | ||||
| 
 | ||||
| .. _virtualenv: https://virtualenv.pypa.io/en/latest/ | ||||
| 
 | ||||
| You will also need to ensure that the virtualenv has the project directory | ||||
| added to the path. | ||||
| 
 | ||||
| .. index:: virtualenvwrapper | ||||
| 
 | ||||
| Virtualenv with virtualenvwrapper | ||||
| ------------------------------------ | ||||
| 
 | ||||
| In Linux and Mac OSX, you can install `virtualenvwrapper | ||||
| <http://virtualenvwrapper.readthedocs.org/en/latest/>`_, which will take care | ||||
| of managing your virtual environments and adding the project path to the | ||||
| `site-directory` for you: | ||||
| 
 | ||||
| .. code-block:: sh | ||||
| 
 | ||||
|     $ mkdir gvapgsql | ||||
|     $ mkvirtualenv -a gvapgsql gvapgsql-dev | ||||
|     $ cd gvapgsql && add2virtualenv `pwd` | ||||
| 
 | ||||
| 
 | ||||
| .. index:: pip, requirements, dependencies | ||||
| 
 | ||||
| Installation of Dependencies | ||||
| ============================= | ||||
| 
 | ||||
| Depending on where you are installing dependencies: | ||||
| 
 | ||||
| In development: | ||||
| 
 | ||||
| .. code-block:: sh | ||||
| 
 | ||||
|     $ pip install -r requirements/local.txt | ||||
| 
 | ||||
| For production: | ||||
| 
 | ||||
| .. code-block:: sh | ||||
| 
 | ||||
|     $ pip install -r requirements.txt | ||||
|    $ apt install python3-pip | ||||
|    $ python3 -m pip install --user -U pipenv | ||||
|    $ pipenv install --dev | ||||
| 
 | ||||
| .. index:: celery, worker, file queue | ||||
| 
 | ||||
|  | @ -78,6 +31,6 @@ into the gvapgsql directory and run the celery worker with: | |||
| .. code-block:: sh | ||||
| 
 | ||||
|     $ cd gvapgsql | ||||
|     $ celery -A gvapgsql worker -Q pgsql -l info | ||||
|     $ pipenv run celery -A pgsqltasks worker -Q web -l info | ||||
| 
 | ||||
| .. _Celery: http://www.celeryproject.org/ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue