python - How can I tidy up my install script keeping only what is used? -


we use pip installations , want clean packages used installed. acceptable strategy scan python files in python project using pycharm , removing packages have no used imports or possibly go wrong delete installation used?

my install script following.

--find-links=http://pypi.sys.kth.se/local/  # git support setuptools setuptools-git==1.0  django==1.6.2 django-autoslug==1.6.1 django-cas==kth-2.0.3 beautifulsoup==3.2.1 south==0.8.4 pillow==2.3.0 pysolr==2.0.15 django-haystack==1.2.7 django-pagination==1.0.7 whoosh==2.4.1 markdown2==2.1.0 suds==0.4 python-dateutil<2.0 # timezone information pytz<=2013d  django-plainpasswordhasher==0.3  # infrastructure python-memcached==1.53 pymongo==2.7.1   # need this.. mysql-python==1.2.3c1  # icalendar support (deprecated , slow!) vobject==0.8.1c  # icalendar support icalendar==3.5  # sane advanced http client (need support file upload etc) requests==1.2.1   # async task handling (for using simple db backend) # note imples amqplib, anyjson, django-celery, django-picklefield, kombu, ordereddict, pyparsing, python-dateutil not explciitly list here. django-celery==3.1.10 # , celery monitoring flower  # specific celery version. celery==3.1.13  # , pyparse pyparsing==1.5.7 html2text==3.200.3 # convert html (markup) text in mails etc django-rosetta==0.7.4  diff-match-patch>=20110725  django-compressor==1.4  # note jsmin 2.0.4 breaking widget.js etc. jsmin==2.0.2   # coverage testing #coverage  # nose test runner nose==1.3.4 django-nose==1.2 mock  #vcr python vcrpy==1.0.2  freezegun==0.2.2  phonenumbers==7.0.1  # monitoring newrelic==2.34.0.29  # fileserver requirements flask>=0.10 httmock==1.2.2 beaker>=1.6.4 

in general case, approach sounds reasonable, there no guarantee work every code base.

the real solution make sure have adequate test coverage in first place; then, can make change, run test suite(s), , find reasonable confidence whether change broke anything.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -