Package: jupytergraffiti
General instructions for building for pip distributionAfter changingsetup.pyor any part of the Graffiti codebase, increase the version number in setup.py appropriately, around line 37.Then run the commands shown below to upgrade what's stored in pippython3setup.pyprep_to_buildnpm_run_buildsdistbdist_wheelIf you yet don't havetwineinstalled, you need to dopip3 install twine.Now, uploading to the pypi test servers:python3-mtwineupload--repository-urlhttps://test.pypi.org/legacy/dist/*--verbose(For User name you can usewillkessler.)Installing to a host in the cloud, from the test servers:python3-mpipinstall--index-urlhttps://test.pypi.org/simple/jupytergraffitiTesting new installation on cloud host:jupyternotebook—port=3001—ip=127.0.0.1—allow-rootUploading to the pypi production servers:python3-mtwineuploaddist/*(For User name you can usewillkessler.)General instructions for building for conda distributionNB: this relies on jupytergraffiti being in the main (production) pypi repository.
First time steps:mkdir conda
cd conda
rm -rf jupytergraffiti
# Note that after twine upload to pip, above, there will be about 30 seconds before the new build is accessible to conda.
conda skeleton pypi jupytergraffiti
conda install conda-verifyModifyjupytergraffiti/meta.yamlto includebuild   noarch:  pythonand setrecipe-maintainerson the last line.
Modifyjupytergraffiti/meta.jsonto include github handle:willkessler(appears unnecessary now)(Re)building on macosx:(After you make updates, make sure to bump the version number injupytergraffiti/meta.yml.conda build jupytergraffiti
export GRAFFITI_VERSION=1.0.1.18
anaconda upload ~/anaconda3/conda-bld/noarch/jupytergraffiti-$GRAFFITI_VERSION-py_0.tar.bz2You may need to log in withwillkesslerand the same password you use forpipuploads.
(Optional)Then you want to convert to other architectures and upload these as well:conda convert --platform all ~/anaconda/conda-bld/osx-64/jupytergraffiti-<version>-py36_0.tar.bz2 -o linux64_out
anaconda upload linux64_out/linux-64/jupytergraffiti-<version>-py36_0.tar.bz2... etc for all the architectures you want to support. This last step doesn't seem to be necessary any more (01/23/2020).Finally...To install and test you should be able to do :conda install -c willkessler jupytergraffitiYou can test on Udacity streamed linux desktops with:jupyter notebook —port=3001 —ip=127.0.0.1 —allow-rootBuilding for Windows and building for pip on WindowsTo debug issues on Windows, you need to have cygwin64 and node installed on the system. Then you need to usejupytergraffiti/package.json_windowsinstead ofjupytergraffiti/package.json. This version ofpackage.jsonhas a different build step using utilities provided by Cygwin:...
  "scripts": {
    "build": "/cygwin64/bin/rm.exe -rf graffiti-dist build ../build_for_pip/code-prep && node node_modules/gulp/bin/gulp.js prebuild && cd node_modules/.bin && r_js.cmd -o ../../build.js && cd ../.. && node ./node_modules/gulp/bin/gulp.js moveStyles && cd node_modules/.bin && r_js.cmd -o ../../../build_for_pip/buildPip.js && cd ../.. && node ./node_modules/gulp/bin/gulp.js pipMoveStyles"
  },
...You can follow the steps above to build for pip. For creating the pip artifact, from this directory do:python3 setup.py prep_to_build npm_run_build sdist bdist_wheelbut then you can install from this build, without uploading to pypi servers, by simply :unpacking the tarball found in the dist directoryswitching to the unpack directoryfinally:pip install .