Comments (8)
Hi,
as stated in #80 (comment), you can use extra_requires
to specify the dependencies, for example:
setup(
name="memacs",
...
extras_require={
"lastfm": ["pylast"],
"twitter": ["twython"],
}
)
so a user can pip install memacs[lastfm]
if you only need lastfm functionality.
Another option is to split it in separate packages, but having them under the same namespace by using namespace packages.
from memacs.
Thanks @sanzoghenzo, this is really good input here!
Are you feeling confident to contribute a modified setup.py
? If you could do me this favor, I'd be very glad since you seem to have some experiments with this option while I don't...
from memacs.
Hi @novoid ,
honestly I moved to other stuff an I didn't have the time to look at this project...
If I have some spare time I'll look into that. Since I didn't write any of the code, it could take me quite some time and I can incur in errors; also, I don't know what granularity you wish to achieve (does every single module need to be installed separately?)
That said, I'll try to do it.
from memacs.
Also note that, for the scripts to be installed as dependencies, and to ensure cross platform compatibility, I need to change #96 and move the script definition to the "console_script" of "entry_points" argument as I explained in #80 (comment).
from memacs.
With the latest contribution of @sanzoghenzo, at least specific module dependencies could be installed optionally. This definitively solves some issues we had.
However, the main question still applies for other reasons as well:
Wouldn't it be better to split the main framework and the modules to separate Git(Hub) repositories?
This would have several advantages:
- Third-party modules can be maintained by their original authors much better: clear authorship/owners, issue notifications, ...
- A cleaner separation between the Memacs framework and the modules.
- Even in this repository, I added some "works-on-my-machine"/standalone modules in the
tmp
sub-hierarchy. Those should be replaced by proper modules but I don't feel too much pressure for now.
- Even in this repository, I added some "works-on-my-machine"/standalone modules in the
- more? (add comment)
Disadvantages:
- There could be Memacs modules that require older and specific Memacs framework versions.
- This issue might also apply on a combined repository.
- more? (add comment)
In case the repo should be splitted, what are the main tasks to be done?
- Notify external authors
- Keep this repo as framework repo
- Move my own modules to separate repos
- Losing all their history?
- How to inform the Memacs users of this change properly?
from memacs.
See #114 (comment) for an idea on splitting up within the same repo in order to install a module like pip install memacs[photos]
from memacs.
See #114 (comment) for an idea on splitting up within the same repo in order to install a module like
pip install memacs[photos]
Hi @novoid ,
the things I stated in that comment are exactly the same as we discussed here, there's no new information there (I didn't remember any of this 😅) - without splitting the project into multiple sub-packages, memacs will be installed in full and only the dependencies can be selectively installed.
The way to go is still to split the code:
setup.py
memacs/
# No __init__.py here.
photos/
# Sub-packages have __init__.py.
__init__.py
photos.py
with setup.py
containing:
from setuptools import setup, find_namespace_packages
setup(
name='memacs-photos',
...
packages=find_namespace_packages(include=['memacs.*'])
)
What is up to you is to decide if all these sub packages need to stay in the same repository (this one), or if you can/want create one repo per sub-package.
The latter could be a bit overkill (especially if a sub package consists of only one module) and you will loose the git history, but can be useful for transitioning (especially if you call the new metapackage something different from memacs
, so they can live simultaneously on pypi).
from memacs.
Hi @novoid , the things I stated in that comment are exactly the same as we discussed here, there's no new information there (I didn't remember any of this sweat_smile) - without splitting the project into multiple sub-packages, memacs will be installed in full and only the dependencies can be selectively installed.
Thanks for the clarification so that even I was able to understand the implications of your suggested change. ;-)
In this case, I reopen #114 because it does not split up the Memacs modules into separate repositories, allowing for different authors to keep their authorship.
This issue here still follows the idea of separating the Memacs modules, #114 follows the idea of letting the user decide which dependencies she wants to set up.
from memacs.
Related Issues (20)
- Difference to Orger + plans for a Hypothesis module HOT 1
- memacs_firefox output does not include url title HOT 7
- Updating to Python 3.9 results in 'HTMLParser' object has no attribute 'unescape' error HOT 4
- memacs/ical fails to parse valid iCalendar files & generally mishandles timezones HOT 1
- memacs_filenametimestamps exclude multiple directories not working HOT 1
- Can't parse timestamp HOT 1
- suggest: screencast examples HOT 5
- memacs_csv: help parameter is not working HOT 3
- implement sub-packages to install only selected module dependencies HOT 6
- suggest revision installation via pip, provision of test/reference data HOT 2
- a few links in `README.org` are dysfunctional HOT 1
- suggest: extension of general README.org (though pending revision) HOT 1
- Project dependencies may have API risk issues HOT 1
- redirecting Memacs std output to file causes broken Orgdown format (instead of using -o parameter) HOT 8
- Add optional parameter for body text
- Feature Request: Matrix Module HOT 1
- --add-to-time-stamps doesn't work at least with filenametimestamp module
- AttributeError: type object 'OrgFormat' has no attribute 'datetime' - after ubuntu update HOT 3
- kodi: probable issue with content of row (OrderedDict) HOT 3
- filenametimestamps exclusion not working if excluded directory contains "bad files" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memacs.