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

Turn repo in to a python package #2

Merged
merged 3 commits into from
Feb 15, 2021
Merged

Turn repo in to a python package #2

merged 3 commits into from
Feb 15, 2021

Conversation

symroe
Copy link
Member

@symroe symroe commented Feb 10, 2021

This PR makes the design system installable via pip or other standard python packaging tools.

For testing before merge, use pip install git+https://github.com/DemocracyClub/design-system.git@python-package.

This will install a python package that can be imported:

import dc_design_system

The only thing this package does is to expose the directory it lives in:

>>> import dc_design_system
>>> dc_design_system.DC_SYSTEM_PATH
'/home/symroe/.envs/design_system/lib/python3.8/site-packages/dc_design_system'

This tells us that the system folder in this repo is at /home/symroe/.envs/design_system/lib/python3.8/site-packages/dc_design_system/system.

This path can be used by libsass as an include-path, meaning that, once installed you can write project level sass assuming the system is assessable.

e.g, you can do this:

@import 'partials/_button.scss';

TODO

  • I've called the folder python to indicate that this is about python, assuming we might want to include other package managers in the future. Does this make sense? Should it be python-package or something?
  • Do we want to think about the names of things, given we might be using the system in other contexts? For example, system/partials/_button.scss is less clear than dc_design_system/partials/_button.scss (or whatever). I can rename this in the python package of course.
  • We should get a working version of this in an actual project before merging @VirginiaDooley let's pair on this.

@symroe symroe changed the title Turn repo in to a python package WIP: Turn repo in to a python package Feb 10, 2021
@symroe symroe changed the title WIP: Turn repo in to a python package Turn repo in to a python package Feb 15, 2021
@Heydon
Copy link
Collaborator

Heydon commented Feb 15, 2021

@symroe Let's rename to python-package, I think the name benefits from being more specific.

@symroe symroe merged commit 4b47be9 into master Feb 15, 2021
@symroe symroe deleted the python-package branch June 21, 2021 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants