Created
September 24, 2015 00:22
-
-
Save jmemich/4bcdb48df2cb79c34d20 to your computer and use it in GitHub Desktop.
stuff for ian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from setuptools import find_packages, setup | |
## setup.py | |
def main(): | |
def read(fname): | |
with open(os.path.join(os.path.dirname(__file__), fname)) as _in: | |
return _in.read() | |
setup( | |
name="name", | |
version="1.0", | |
author="author", | |
author_email="xyz@gmail.com", | |
url="url.com", | |
description="", | |
packages=find_packages(), | |
long_description=read('README.md') | |
) | |
if __name__ == "__main__": | |
main() | |
## | |
current="" | |
for req in $(cat requirements.txt); do echo $req > /tmp/curpip.txt; pip install -U --no-deps $req > /tmp/pip.log 2>&1; if [[ $? != 0 ]]; then cat /tmp/pip.log; echo "Installing $req failed"; exit 1; fi; done& | |
sleep 50 | |
while true; do | |
current=`cat /tmp/curpip.txt` | |
running=`ps aux | grep pip | grep -v grep` | |
if [[ $running != "" ]]; then | |
echo "Pip still running on $current"; sleep 50 | |
else | |
echo "Pip finished" | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment