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

Delete old local gslab_python versions upon both installation methods #122

Closed
qlquanle opened this issue Sep 4, 2017 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@qlquanle
Copy link

qlquanle commented Sep 4, 2017

At the moment a developer/user can install gslab_python in two ways:

  1. Clone gslab_python and run python setup.py install clean

  2. Clone template (as of 4.1.0) and run python config/config_python.py.

The problem is that 1) writes the egg version into site_package and 2) writes both the egg and the subfolders (gslab_blahblah) into site_package. What this leads to is the following behavior:

a) Install gslab_python using 2)

b) Install different version of gslab_python using 1)

Now the versions of gslab_python on your computer are out of sync.

Our solution: remove both the egg and the subfolders upon installation of gslab_python using either method. Implemented by a search and destroy function in setup.py, then test whether python config/config_python.py properly runs that script when installing gslab_python.

@qlquanle qlquanle added the bug label Sep 4, 2017
@qlquanle qlquanle added this to the 4.1.0 milestone Sep 4, 2017
@arosenbe
Copy link
Contributor

arosenbe commented Sep 4, 2017

We want to warn the user, explain what's going on, and ask for permission before search and destroy. Also make sure this works on Windows (no idea about redirection in that setting).

@arosenbe
Copy link
Contributor

arosenbe commented Sep 5, 2017

Under PR at #123. What a fun number.

arosenbe added a commit that referenced this issue Sep 5, 2017
arosenbe added a commit that referenced this issue Sep 5, 2017
…th installation methods (#123)

* #122 test what pip does

* #122 cut some old code

* #122 abs path in setup.py

* #122 fix abs apth

* #122 Force uninstallation of all gslab tools at install time

* #123 #122 import site
@arosenbe
Copy link
Contributor

arosenbe commented Sep 5, 2017

PR passed at #123.

setup.py now checks for any gslab-stamped packages (or gencat) in the default package installation location and deletes whatever it finds.

@arosenbe arosenbe closed this as completed Sep 5, 2017
This was referenced Sep 5, 2017
qlquanle pushed a commit that referenced this issue Mar 3, 2018
* Pull request for #92: Change executable-finding behavior in Stata builder (#104)

* #92 rm config checking of stata exec, unless stata packages are checked

* #92 edit the messages

* #92 fix conditional block for default exec

* #92 fix conditional block in build_stata after merge

* Fix missing paren

* Pull request for #98: R command line syntax (#103)

* #98 first pass

* #98 edits

* Pull request: Switch user_config.yaml to config_user.yaml (#106)

* switch name to config_user.yaml

* #61 more switchs

* Pull Request for #96: Write LaTeX builder (#105)

* #96 add latex builder

* #96 write test for latex builder

* #96 change to 4.0.2

* #96 small edit

* #96 delete log files

* #96 add nonstop option in latex builde

* Pull request for #93: add moving top level log to end_log  (#107)

* #93 first pass

* #93 second pass

* #93 add carriage return

* Pull request for #95: Check target files after each building step (#110)

* #95 first pass

* #95 second pass after testing

* fix PR

* small edits

* Pull Request for #108: Fix unit tests in the current builders (#109)

* #108 update test_build_stata

* #108 fix test_configuration_tests

* #108 fix test_log

* #108 fix test_build_r

* #108 change build_r and tests

* #108 modify test_build_r

* #108 fix some checks after adding check_targets

* #108 comment out target check in build_tables

* Pull request for #111: Fix release.py (#113)

* #111 fix

* #111 edit readme

* #111 fix PR

* Pull request for #97: Anything builder (#114)

* #97 write anything builder

* #97 change log_file to log_ext mechanism

* #97 new version, builder generator

* #97 add pretty comments

* #97 fix comment indent

* #97 respond to PR

* #97 warning edits

* Pull request for #94: allow folders to be excluded from search (#115)

* #94 allow folders to be exluded from search

* #94 add argument to upper level function

* #94 fix syntax

* Pull request: Bug in tablefill for latex (#102)

* LB Edits for latex tablefill

* #102 small edits and re-run tests

* #102 update python and re-run

* #102 update tests for tablefill latex

* #102 edit gitignore

* move import SCons.builder to builder instead of generator

* move import Scons.Builder outside action and into builder generator

* Pull request for migrating gencat (#116)

* first pass

* edit readme

* adding test

* uploading test

* fix test log

* Pull request for gslab-econ/template#60: Provenance (#120)

* #60 provenance.py mockup

* template#60 formatting

* #60 add pretty comments

* #60 add release mechanism

* template#60 respond to pr

* template#60 release PR

* gslab-econ/template#60 fix bug

* #60 respond to PR

* Pull request for #60: Provenance (round 2) (#121)

* #60 provenance.py mockup

* template#60 formatting

* #60 add pretty comments

* #60 add release mechanism

* template#60 respond to pr

* template#60 release PR

* gslab-econ/template#60 fix bug

* #60 respond to PR

* gslab-econ/template#60 add non-default sig

* gslab-econ/template#60 add external provenance option for release

* gslab-econ/template#60 pr

* gslab-econ/template#60 fix syntax

* Pull request for #91: size warning when git-lfs not present (#118)

* #91 first pass

* #91 improve warning message

* #91 second pass

* fix bug

* fix more bugs

* fix bugs and third pass

* fix bugs

* add in comments and options for path of git attributes

* first pass on debrief

* fix PR

* miss one file_name

* fix pr

* small edits

* implement debrief PR

* small edits

* Pull request for #122: Delete old local gslab_python versions upon both installation methods (#123)

* #122 test what pip does

* #122 cut some old code

* #122 abs path in setup.py

* #122 fix abs apth

* #122 Force uninstallation of all gslab tools at install time

* #123 #122 import site

* Pull request for template#60: update Provenance docs, update function args (#124)

* Allow version and readme args in function call instead of sysagrv, update docs

* respond to PR

* Pull request for #126: Fix lingering issues with release.py (#127)

* #126 hit all checks, no documentation

* #126 fix overwrite of scons_local_path

* #126 docs

* #127 #126 small readme changes for PR

* #126 small fixes

* #127 #126 abstract text search, better config checks

* #127 #126 search dir not output for SConstruct

* Pull request for #131: Change provenance to state_of_inputs (#132)

* #128 binding file limit on directory walk

* #131 purge provenance

* #131 first pass dir recording system

* #131 an SCons -> a SCons

* #131 change default log location

* #131 better naming, load into __init__, better prereq check

* #131 change default name for log

* #132 #131 change default log name

* #132 #131 gslab-econ/template#87 new log headding

* #132 #131 better path checks, fix walk-break rule, new path names

* #132 #131 fix heading creation of heading with hash

* Pull request for #130: Uncouple directory structure from gslab_python (#133)

* #130 fix log.py uncoupling

* #130 missing slash

* #133 add log.py optional argument

* #126 fix issue (#137)

* Pull request for 4.1.0: Change log exclusion syntax to prune (#138)

* change log exclusion syntax to proune

* #138 respond to pr

* gslab-econ/template#88 recursive fun to flatten dicts (#139)

* gslab-econ/template#88 recursive fun to flatten dicts

* #88 PR, don't clobber repeated keys

* #88 cleaner string manipulation in flatten_dict

* Pull request for #142: Allow parallelization in MATLAB builder (#143)

* #142 avoid collisions with sha1 hash of path

* #143 #142 fix source file removal

* Pull request for #140: Fix order of operations in release (#141)

* #140 remove superfluous assett upload

* #140 swap order of git and scons check; note behavior in readme

* #140 format readme

* #141 #140 split up up_to_date, raise error if not up-to-date

* #141 #140 put elif after if

* #141 #140 output -> log

* #141 #140 add function to determine if scons is a dry run

* #140 try some logging stuff

* #141 #140 loggers get own files, toggle on scons dry-run

* Pull request for #144: Do gslab_python side of MG review for 4.1.0 (#145)

* #144 gslab-econ/template#96 working versions of clean builders

* #144 fix recursive cases when checking vers and multiple cuaght exception

* #144 small adjustments to anything builder

* #145 #144 switch order of args in builders

* #145 #144 cleaner access to default stata executable

* #145 #144 docstrings in prereq checks

* #145 #144 unscramble more target/source args in the builders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants